Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi,

I run a website where we write articles about lots of stuff. Like movies, games, funny stuff etc. Sometimes we have reviews and sometimes we have just random videoes and stuff.

I've been trying to make a "Related Articles" for a while, but I don't want my writers to have to do any extra work in Couch when publishing articles. Therefor I thought I could try to use the Search function built into Couch to build a "Related Article" function

So in Page-View I made something like this:
Code: Select all
<cms:search masterpage='blog.php' limit='10' keywords="<cms:show k_page_title />" >
    <li><a href="<cms:show k_page_link />"><cms:show k_search_title /></a></li>
</cms:search>


The problem is that my site is in Norwegian, and we have 3 weird characters in our alphabet (æ ø å) and when they are appearing in k_page_title I get a 500 server error ( http://sistestopp.com/sok.php?s=M%C3%98T+CAMILLA+LUDDINGTON%2C+N%C3%85TIDENS+LARA+CROFT&nc=1 ). I tried to use k_page_name instead but that adds a dash (-) in between all the words, I kind of need to change that dash to a + sign for the search to work properly.

Also, could this lead to problems if the title of the article is very long. Sometimes we have upto 10 words in the title.
Hi Datsun,

I can see that the link you posted results in '500 Internal Server Error'.
Could you please try explicitly using that title with <cms:search> as follows and let me know if it shows the results or throws the same error ?
Code: Select all
<cms:search masterpage='blog.php' limit='10' keywords="MØT CAMILLA LUDDINGTON NÅTIDENS LARA CROFT" >
    <li><a href="<cms:show k_page_link />"><cms:show k_search_title /></a></li>
</cms:search>

Thanks.
Hey KK, thanks for replying

This works just fine:
Code: Select all
 <cms:search masterpage='blog.php' limit='10' keywords="MØT CAMILLA LUDDINGTON NÅTIDENS LARA CROFT" >
    <li><a href="<cms:show k_page_link />"><cms:show k_search_title /></a></li>
</cms:search>


This gives a 500 error:
Code: Select all
 <cms:search masterpage='blog.php' limit='10' keywords="<cms:show k_page_title />" >
    <li><a href="<cms:show k_page_link />"><cms:show k_search_title /></a></li>
</cms:search>

But this one works when I'm reading a page that is called for example "Spectre", it's only when there is special Norwegian letters in k_page_title it gives the 500 error.

It's strange isn't it?
Yes, it is strange.
Could you please take a look at your web-server's error log and see what it reports just after this error?

If you wish, you may grant me access to your site (FTP+Couch) and I can take a look at the issue for you.
4 posts Page 1 of 1