Wierd errors with News module [Solved]

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
almustone
Forum Members
Forum Members
Posts: 43
Joined: Wed Oct 22, 2014 7:04 pm

Wierd errors with News module [Solved]

Post 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
Attachments
Näyttökuva 2015-08-04 kello 13.48.47.png
Last edited by almustone on Tue Sep 15, 2015 8:19 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Wierd errors with News module

Post 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...
almustone
Forum Members
Forum Members
Posts: 43
Joined: Wed Oct 22, 2014 7:04 pm

Re: Wierd errors with News module

Post 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


----------------------------------------------
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Wierd errors with News module

Post 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..?
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: Wierd errors with News module

Post 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.
almustone
Forum Members
Forum Members
Posts: 43
Joined: Wed Oct 22, 2014 7:04 pm

Re: Wierd errors with News module

Post 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
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Wierd errors with News module

Post by Rolf »

Check search result template
Might help http://www.cmscanbesimple.org/blog/mous ... ate-errors
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
almustone
Forum Members
Forum Members
Posts: 43
Joined: Wed Oct 22, 2014 7:04 pm

Re: Wierd errors with News module

Post 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
almustone
Forum Members
Forum Members
Posts: 43
Joined: Wed Oct 22, 2014 7:04 pm

Re: Wierd errors with News module

Post 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
almustone
Forum Members
Forum Members
Posts: 43
Joined: Wed Oct 22, 2014 7:04 pm

Re: Wierd errors with News module

Post 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
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Wierd errors with News module

Post by velden »

News module has the 'detailtemplate' parameter, you don't use it in the {News ...} tag?
almustone
Forum Members
Forum Members
Posts: 43
Joined: Wed Oct 22, 2014 7:04 pm

Re: Wierd errors with News module

Post 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
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Wierd errors with News module

Post 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.
almustone
Forum Members
Forum Members
Posts: 43
Joined: Wed Oct 22, 2014 7:04 pm

Re: Wierd errors with News module

Post 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!
Post Reply

Return to “The Lounge”