Page 1 of 2

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

Posted: Fri Dec 17, 2010 2:25 pm
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

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

Posted: Fri Dec 17, 2010 2:40 pm
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  :)

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

Posted: Fri Dec 17, 2010 2:45 pm
by nils73
Here's the link: http://www.anatom5.de/

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

Posted: Fri Dec 17, 2010 2:55 pm
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

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

Posted: Fri Dec 17, 2010 4:15 pm
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

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

Posted: Fri Dec 17, 2010 5:12 pm
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

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

Posted: Fri Dec 17, 2010 6:38 pm
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'}

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

Posted: Fri Dec 17, 2010 6:41 pm
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

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

Posted: Sat Dec 18, 2010 7:33 pm
by nils73
No, sorry ... plain news-module-tag did not work.

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

Posted: Sat Dec 18, 2010 8:09 pm
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

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

Posted: Sat Dec 18, 2010 9:11 pm
by Dr.CSS
Can you post your news summary template?...

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

Posted: Sun Dec 19, 2010 1:11 pm
by nils73
Dr. CSS: I can - but I don't see any link between news-summary and pretty URLs. Can you explain please?

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

Posted: Sun Dec 19, 2010 2:43 pm
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  :)

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

Posted: Sun Dec 19, 2010 5:59 pm
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

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

Posted: Sun Dec 19, 2010 8:18 pm
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