Page 1 of 1
Wierd errors with News module [Solved]
Posted: Tue Aug 04, 2015 11:04 am
by almustone
Hi!
After updating to version 1.12 I have get a wierd error messages. If I check my Admin log there are plenty of "Error: Unable to load template module_db_tpl 'News" errors. But everything is working fine. Is this just a new version bug? I'm using News module at my front page. I don't get any error messages if I browse site.
Best regards
- Aleksi
Re: Wierd errors with News module
Posted: Tue Aug 04, 2015 8:00 pm
by Dr.CSS
What version did you upgrade from etc. etc., did you look at the tag and make sure it is using the correct syntax as it may be case sensitive and the template name may have to be changed to not have spaces or other strange characters in them now...
Re: Wierd errors with News module
Posted: Tue Aug 18, 2015 6:00 am
by almustone
Hi!
I upgraded from 1.11 -> 1.12. I have checked correct spelling and everything is fine, but I there still come error messages.
I'm using Simplex template. Can you say which template that is where I'm getting errors? Is it Summary Templates, Detail Templates or Form Templates?
My system info:
----------------------------------------------
Cms Version: 1.12
Installed Modules:
CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.9
ModuleManager: 1.5.8
News: 2.15.1
Search: 1.7.12
ThemeManager: 1.1.8
Gallery: 2.0.2
FormBuilder: 0.8.1.1
TinyMCE: 2.9.12
Showtime: 3.4
CGBlog: 1.12.10
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 32000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.4.41
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 120
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 32M
upload_max_filesize: 32M
session_save_path: /tmp (0777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.40
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages
Server Time Diff: No filesystem time difference found
----------------------------------------------
Re: Wierd errors with News module
Posted: Tue Aug 18, 2015 9:30 am
by Dr.CSS
Is the news tag in the template or in the page content or a second content block, it almost looks like it is missing a ' in the template call, do you have a template call in the tag, are you trying to call a non existing detail page..?
Re: Wierd errors with News module
Posted: Wed Aug 19, 2015 11:26 pm
by Jeff
I think I had something like this on one of my old sites (old client so I can't double check). I believe it is something to do with what you have in your template. It is coming from when you click to edit content, I believe (I haven't fully debugged it) the system is parsing the templates to find {content} blocks and you get that error when it sees module calls.
Re: Wierd errors with News module
Posted: Thu Aug 27, 2015 1:50 pm
by almustone
Hi!
I finally found a trigger, but can you guys help me to solve it? Error happens, when I click news from search results. Url for a news is different if I click it from search result or there than it is when I just click url from website.
I noticed pretty urls works fine (normal link for my news), but url at search results looks like this: index.php?mact=News,cntnt01,detail,0&cntnt01articleid=47&cntnt01returnid=317
And klicking this url gives me CMS "Oops! Something happened.." error. Theres no error code. Any suggestions how to fix problem?
Thanks for a help!
- Aleksi
Re: Wierd errors with News module
Posted: Thu Aug 27, 2015 3:02 pm
by Rolf
Re: Wierd errors with News module
Posted: Tue Sep 08, 2015 10:22 am
by almustone
Hi!
Thanks for a tips. I don't know how to edit this search result to make it show links as pretty urls.
Here is search result template and I think it is that red codeline:
<h3>{$searchresultsfor} "{$phrase}"</h3>
{if $itemcount > 0}
<ul>
{foreach from=$results item=entry}
<li>{$entry->title} - <a href="{$entry->url}">{$entry->urltxt}</a> ({$entry->weight}%)</li>
{*
You can also instantiate custom behaviour on a module by module basis by looking at
the $entry->module and $entry->modulerecord fields in $entry
ie: {if $entry->module == 'News'}{News action='detail' article_id=$entry->modulerecord detailpage='News'}
*}
{/foreach}
</ul>
<p>{$timetaken}: {$timetook}</p>
{else}
<p><strong>{$noresultsfound}</strong></p>
{/if}
Can you guys please help me with that code?
- Aleksi
Re: Wierd errors with News module
Posted: Tue Sep 08, 2015 11:35 am
by almustone
HI!
I updated to CMS Made Simple version 1.21.1.
Now there are News at pretty url, but there is still a problem. If I compare urls at my News page and from search result, News page add detailtemplate after url and that works fine. But at search result that isn't there.
So how I can edit that News Results Template to add my News detail template tag after url?
Thanks for a help!
Aleksi
Re: Wierd errors with News module
Posted: Thu Sep 10, 2015 2:25 pm
by almustone
Can somebody please help me? I just can't do this by myself.
1. Here is my search result template:
<h3>{$searchresultsfor} "{$phrase}"</h3>
{if $itemcount > 0}
<ul>
{foreach from=$results item=entry}
<li>{$entry->title} - <a href="{$entry->url}">{$entry->urltxt}</a> ({$entry->weight}%)</li>
{*
You can also instantiate custom behaviour on a module by module basis by looking at
the $entry->module and $entry->modulerecord fields in $entry
ie: {if $entry->module == 'News'}{News action='detail' article_id=$entry->modulerecord detailpage='News'}
*}
{/foreach}
</ul>
<p>{$timetaken}: {$timetook}</p>
{else}
<p><strong>{$noresultsfound}</strong></p>
{/if}
2. Working News url is like http://www.mywebsite.com/news/..../d.mytemplatename
3. At search result is only gives me url: http://www.mywebsite.com/news/..../
So there is d.mytemplatename missing.
4. How I need to edit that search result template so it add that "d.mytemplatename" after url?
Thanks
Aleksi
Re: Wierd errors with News module
Posted: Thu Sep 10, 2015 2:54 pm
by velden
News module has the 'detailtemplate' parameter, you don't use it in the {News ...} tag?
Re: Wierd errors with News module
Posted: Thu Sep 10, 2015 5:25 pm
by almustone
Hi! Yes I use detailtemplate tag at my site places where I want to display news (frontpage etc.), but that is not working same way at search results. Can I put news detailtemplate tag to search results template?
Aleksi
Re: Wierd errors with News module
Posted: Fri Sep 11, 2015 7:29 am
by velden
Ah, overlooked that.
You might be able to solve this by using the {module_action_link} plugin that comes with the CGSimpleSmarty module (read help of the module) in Extensions >> Modules
Or have a look at the {cge_module_hint} plugin that comes with CGExtensions, again: read the help. I think this plugin could be helpful but never used it myself.
Re: Wierd errors with News module
Posted: Fri Sep 11, 2015 10:57 am
by almustone
Hi!
Thanks for a tips. I found a problem and now it is solved!
There was no active "default" template selected in my News detail template. After setting that active my search now works normally.
Thanks everyone!