• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [CLOSED, not solved] Search & News - error 404
PostPosted: Fri Oct 25, 2013 1:44 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Sat Jul 12, 2008 3:50 am
Posts: 425
Location: Zeist, Netherlands
Default result template of Search module says
Code:
  {*
     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'}
  *}

Using this gives a 404 error.
My result template:
Code:
<h3>{$searchresultsfor} &quot;{$phrase}&quot;</h3>
{if $itemcount > 0}
<ul>
  {foreach from=$results item=entry}
  <li>
{if $entry->module == 'News'}
NEWS - {News action='detail' article_id=$entry->modulerecord detailpage='zoek'}  ({$entry->weight}%)
{else}
<a href="{$entry->url}">{$entry->urltxt}</a> ({$entry->weight}%)
{/if}
</li>
  {/foreach}
</ul>

<p>{$timetaken}: {$timetook}</p>
{else}
  <p><strong>{$noresultsfound}</strong></p>
{/if}


  {*
     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'}
  *}

What have I done wrong?

Frank

system info:


----------------------------------------------

Cms Version: 1.11.9

Installed Modules:

CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.3
MenuManager: 1.8.6
ModuleManager: 1.5.5
News: 2.13
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
Gallery: 1.6.1
GBFilePicker: 1.3.3
CGExtensions: 1.37.2
CGSmartImage: 1.13
MicroTiny: 1.2.5
AdvancedContent: 0.9.4.3


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 50000000
url_rewriting: none
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.3.3
md5_function: Aan (Waar)
gd_version: 2
tempnam_function: Aan (Waar)
magic_quotes_runtime: Uit (Onwaar)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 30
output_buffering: Aan
safe_mode: Uit (Onwaar)
file_uploads: Aan (Waar)
post_max_size: 32M
upload_max_filesize: 50M
session_save_path: /tmp (0777)
session_use_cookies: Aan (Waar)
xml_function: Aan (Waar)
xmlreader_class: Aan (Waar)

Aan (Waar) = True
Uit (Onwaar) = False



Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.41
Server Db Grants: Er is een "GRAND ALL" permissie gevonden, alles lijkt in orde.
Server Time Diff: Geen tijdverschil aangetroffen


----------------------------------------------


Last edited by frankmanl on Sun Nov 10, 2013 3:38 am, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Search & News - error 404
PostPosted: Fri Oct 25, 2013 6:48 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7689
Location: The Netherlands
Try http://docs.cmsmadesimple.org/troublesh ... -error-404

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Search & News - error 404
PostPosted: Fri Oct 25, 2013 7:47 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Sat Jul 12, 2008 3:50 am
Posts: 425
Location: Zeist, Netherlands
Quote:
Troubleshooting - news module - error 404
Error message
Opening a News detail or categorypage ends up with an error 404: page doesn't exist.

Solution
When using a detailpage for your detail view, it could be the detailpage is set to inactive in the listcontent, or perhaps it was renamed or removed.
1. Check the detailpage parameter in the News tag(s) {News detailpage='foo'}. Page alias "foo" must be present.
2. Also check the page setting in the News module adminpanel under the Options tab: "Default page to use for detail views"

• detailpage='zoek' does exist and is active (although not shown in menu)
• default detailpage for News is some other page, but changing it to 'zoek' does not resolve the problem; besides - News detailpage='foo' should override that, shouldn't it?

Search works alright when no news item is returned (try searching BBQ), but the error appears as soon as a news item is returned (try Vloeimans).

When I leave out the if-statement from search template:
Code:
<ul>
  {foreach from=$results item=entry}
  <li>
<a href="{$entry->url}">{$entry->urltxt}</a> ({$entry->weight}%)
</li>
  {/foreach}
</ul>

all results are shown, but then I can't control the detail template for found News items (I use different templates for different News categories) - the default News detail template is always used.


Last edited by frankmanl on Thu Mar 13, 2014 1:59 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [CLOSED, not solved] Search & News - error 404
PostPosted: Sun Nov 10, 2013 3:40 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Sat Jul 12, 2008 3:50 am
Posts: 425
Location: Zeist, Netherlands
It's not the search module, it's the news module. I'll try to find out where exactly it goes wrong and then maybe open another topic.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [CLOSED, not solved] Search & News - error 404
PostPosted: Sun Nov 10, 2013 10:51 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3105
Location: The Netherlands
It's a long shot but you could try to use

Code:
...
{if $entry->module == 'News'}
NEWS - {cms_module module='News' action='detail' article_id=$entry->modulerecord detailpage='zoek'}  ({$entry->weight}%)
{else}
...


BTW: wouldn't this show the complete News details inside the search results? Or is that exactly what you're looking for?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting