[SOLVED] Pretty URLs for news / search not working in 1.9.2

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

[SOLVED] Pretty URLs for news / search not working in 1.9.2

Post by nils73 »

I really love 1.9.2 because it's lean and fast and offers great features. However I must admit that I don't quite understand why after upgrading my news-module keeps throwing ugly urls. I changed from internal pretty to mod_rewrite and back - not change. Any hints? Anything I need to configure?

Regards
Nils
Last edited by nils73 on Wed Dec 22, 2010 8:47 am, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty URLs for news / search not working in 1.9.2

Post by Rolf »

nils73 wrote: I really love 1.9.2 because it's lean and fast and offers great features. However I must admit that I don't quite understand why after upgrading my news-module keeps throwing ugly urls. I changed from internal pretty to mod_rewrite and back - not change. Any hints? Anything I need to configure?
Hello Nils,

Can you give us some more technical information? System Information.
When you tried mod_rewrite, did you also have the right .htaccess file in the root of the website?
Do you have a link to this website? (perhaps in PM.)

Regards, Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Pretty URLs for news / search not working in 1.9.2

Post by nils73 »

Here's the link: http://www.anatom5.de/
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty URLs for news / search not working in 1.9.2

Post by Rolf »

Starting with the Search problem
Try to add to the tag:
{search ... search_method="post"}

Where exactly do you use the news tag?

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Pretty URLs for news / search not working in 1.9.2

Post by nils73 »

Rolf, thanks a lot. Search works fine. Sorry, I think my post broke in two last time ... so here's all of it now.

We use the news-module here: http://www.anatom5.de/publikationen/pre ... ungen.html and to answer the rest of your first question:
Can you give us some more technical information? System Information.
Yes, it's CMSMS 1.9.2 running on LAMP. I use mod_rewrite with the new .htaccess file (out of doc-folder) and I put it in the root of the website. We have our own jail for hosting so the webserver does pretty much everything that we want it to do.

Hope that helps.
Nils
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty URLs for news / search not working in 1.9.2

Post by Rolf »

nils73 wrote: We have our own jail for hosting so the webserver does pretty much everything that we want it to do.
You lucky guy  :D

I have seen it. Can you please post your {News ...} tag here? The one you have on your webpage I mean... Not all parameters function in combination with pretty_urls. So this might be the problem here.
Perhaps try to just call a plain {News} in the page and see what happens.

And did you try to clear the websites cache yet?  :-\

grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Pretty URLs for news / search not working in 1.9.2

Post by nils73 »

Thanks for your support, Rolf.

Ah, I see ... have cleared everything and even via FTP cleared templates_c. So here is my news-tag

Code: Select all

{news pagelimit='10' lang='de-DE' category='Presse' detailpage='archiv' summarytemplate='xxx' detailtemplate='yyy'}
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty URLs for news / search not working in 1.9.2

Post by Rolf »

nils73 wrote:

Code: Select all

{news pagelimit='10' lang='de-DE' category='Presse' detailpage='archiv' summarytemplate='xxx' detailtemplate='yyy'}
Please try to use plain {news} in that page, no parameters.
See if the urls are 'pretty' then  ;)

®olf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Pretty URLs for news / search not working in 1.9.2

Post by nils73 »

No, sorry ... plain news-module-tag did not work.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty URLs for news / search not working in 1.9.2

Post by Rolf »

nils73 wrote: No, sorry ... plain news-module-tag did not work.
I am sorry Nils, but I don't see it  :-\
Perhaps I am overlooking something, but I don't know what at the moment.

Perhaps somebody else has an idea what to do...

grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URLs for news / search not working in 1.9.2

Post by Dr.CSS »

Can you post your news summary template?...
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Pretty URLs for news / search not working in 1.9.2

Post by nils73 »

Dr. CSS: I can - but I don't see any link between news-summary and pretty URLs. Can you explain please?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty URLs for news / search not working in 1.9.2

Post by Rolf »

nils73 wrote: Dr. CSS: I can - but I don't see any link between news-summary and pretty URLs. Can you explain please?
I think what DrCss is trying to do, is just double check the parts that we both didn't do above. Because it is to obvious that it can't be the problem  :D
But like I said we are overlooking something ;)
Is something hardcoded at some point, or... whatever...
I can see where he is going to.

Grtz. Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URLs for news / search not working in 1.9.2

Post by Dr.CSS »

What I'm saying is I don't see anyway to add a class to the more link as in the default news summary template the call for it is basically hard coded in the PHP file and the call looks like this...


[{$entry->morelink}]


So how did you get a class in yours?...

<a class="projectlink" href="index.php?mact=References,cntnt01,detail,0&cntnt01articleid=50&cntnt01
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Pretty URLs for news / search not working in 1.9.2

Post by nils73 »

Okay, let's get startet with the news in our press-section as mentioned in this thread (and not on the start-page as Dr. CSS quoted - this is a special case):

Code: Select all

<div class="presse">
  <dl>
    {foreach from=$items item=entry name=newslist}
    <dt><a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}"><strong><dfn>{$smarty.foreach.newslist.iteration}. </dfn>{$entry->title|cms_escape}</strong>{if $entry->subline}<br />{$entry->subline}{/if}</a></dt>
      <dd>{if $entry->summary}{eval var=$entry->summary|strip_tags}{/if}</dd>
      <dd class="artikellink"><a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}"><span class="hideme">'{$entry->title|cms_escape:htmlall}' </span>komplett lesen</a></dd>
    {/foreach}
  </dl>
</div>
{if isset($pagecount) && $pagecount > 1}
{if $pagenumber>1}{assign var='tmp_link' value=$prevpage}{else}{assign var='tmp_link' value=$nextpage}{/if}
{pagination link=$tmp_link param='pagenumber' max=$pagecount  current=$pagenumber assign='temp' pattern='9' extreme='true'}
<div class="paging floatbox">
  <ul>
  {foreach from=$temp key='page_nb' item='tmp'}
    {if !empty($tmp)}<li><a href="{$tmp}">{$page_nb}</a></li>{else}
    <li><strong>Seite {$pagenumber}</strong></li>
    {/if}
  {/foreach}
  </ul>
</div>
{/if}
I don't use morelink but $entry->moreurl instead. Should make no difference.

Regards,
Nils
Post Reply

Return to “CMSMS Core”