Page 1 of 1

Problems with my permalinks (i think)

Posted: Mon Mar 24, 2008 6:32 pm
by kaitimmer
Today i made a fresh install of s9y Version 1.3 as you can see here: blog.kaitimmer.de.

The problem is that my article is shown on the frontpage, but if you click on the articles header, the only message is, that there are no articles.

I use lighttpd and copy-pasted the config from your "Technical Documentation".

Does anyone no whats wrong here?

Re: Problems with my permalinks (i think)

Posted: Mon Mar 24, 2008 9:36 pm
by garvinhicking
Hi!

It seems you removed the "archives" prefix from the config of your permalinks. This is required! You can rename it, but not remove it.

Regards,
Garvin

Posted: Mon Mar 24, 2008 10:04 pm
by kaitimmer
I added it again, but the problem still exists.

Posted: Tue Mar 25, 2008 9:28 am
by garvinhicking
Hi!

What is your permalink config? Please try to reset it to the original ones.

Permalink patterns AFAIR need to end with ".html".

Regards,
Garvin

Posted: Tue Mar 25, 2008 10:33 am
by kaitimmer
Ok, i set it back to:

archives/%id%-%title%.html
(thats the default, right?)

as you can see nothing changes :(

Posted: Tue Mar 25, 2008 1:59 pm
by garvinhicking
Hi!

What about your complete permalink config? How did you set your URL rewriting method?

Does your lighttpd config match the permalinks you entered? I have zero experience with lighttpd, it must set $_SERVER['REQUEST_URI'] to the actual URL...?!

Regards,
Garvin

Posted: Tue Mar 25, 2008 5:32 pm
by kaitimmer
My rewrite rules are set like this:

Code: Select all

  url.rewrite-once = ( "^/archives([/A-Za-z0-9]+)\.html"   => "/index.php?url=/archives/$1.html",$
                       "^/([0-9]+)[_\-][0-9a-z_\-]*\.html" => "/index.php?url=$1-article.html",$
                       "^/feeds/(.*)"                      => "/index.php?url=/feeds/$1",$
                       "^/unsubscribe/(.*)/([0-9]+)"       => "/index.php?url=/unsubscribe/$1/$2",$
                       "^/approve/(.*)/(.*)/([0-9]+)"      => "/index.php?url=approve/$1/$2/$3",$
                       "^/delete/(.*)/(.*)/([0-9]+)"       => "/index.php?url=delete/$1/$2/$3",$
                       "^/(admin|entries)(/.+)?"           => "/index.php?url=admin/",$
                       "^/archive$"                        => "/index.php?url=/archive",$
                       "^/categories/([0-9]+)"             => "/index.php?url=/categories/$1",$
                       "^/plugin/(.*)"                     => "/index.php?url=plugin/$1",$
                       "^/search/(.*)"                     => "/index.php?url=/search/$1",$
                       "^/authors/([0-9]+)"                => "/index.php?url=/authors/$1",$
                       "^/index\.html?"            => "/index.php?url=index.html",$
                       "^/htmlarea/(.*)"                   => "/htmlarea/$1",$
                       "/(.*\.html?)"                      => "/index.php?url=/$1",$
                       "^/(serendipity\.css|serendipity_admin\.css)"       => "/index.php?url=/$1",$
                       "^/(index|atom|rss|b2rss|b2rdf).(rss|rdf|rss2|xml)$" => "/rss.php?file=$1&ext=$2",$
                     )$
I think that matches the .htaccess which s9y has created.

Posted: Tue Mar 25, 2008 5:40 pm
by garvinhicking
Hi!

What about your complete permalink config? :-)

You could try to use /index.php?... instead of /index.php?url=... ?

Regards,
Garvin

Posted: Tue Mar 25, 2008 6:28 pm
by kaitimmer
I'm sorry, but what do you mean with "complete permalink config"?

In the s9y configuration panel, i left everything default.

Posted: Tue Mar 25, 2008 7:14 pm
by garvinhicking
Hi!
kaitimmer wrote:I'm sorry, but what do you mean with "complete permalink config"?
I mean all the input fields that you can change inside your s9y configuration screen for the "Permalinks" section.
In the s9y configuration panel, i left everything default.
Okay, changing the "/archives/%id%-%title%.html" permalink was the only thing you did?

Then there must be something different with the lighttpd rewrite configuration. Maybe you can ask the lighttpd forum and ask them how the config should look like, based on this s9y rewrite .htaccess:

Code: Select all

RewriteEngine On
RewriteBase /serendipity/
RewriteRule ^((archives/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.html)/?) index.php?/$1 [NC,L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/categories/[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)? index.php?url=admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
RewriteRule ^comments/(.*) index.php?url=/comments/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]

Regards,
Garvin

Posted: Tue Mar 25, 2008 11:32 pm
by kaitimmer
I looked in my postgres logfile and found these error, everytime i try to see an entry in my blog

Code: Select all

2008-03-25 23:11:29 CET ERROR:  operator does not exist: integer ~~ unknown at character 1559
2008-03-25 23:11:29 CET HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
2008-03-25 23:11:29 CET STATEMENT:  SELECT  e.id,
                                    e.title,
                                    e.timestamp,
                                    e.body,
                                    e.comments,
                                    e.trackbacks,
                                    e.extended,
                                    e.exflag,
                                    e.authorid,
                                    e.isdraft,
                                    e.allow_comments,
                                    e.last_modified,
                                    e.moderate_comments,

                                    a.realname AS author,
                                    a.username AS loginname,
                                    a.email
                              FROM
                                    serendipity_entries e
                         LEFT JOIN  serendipity_authors a
                                ON  e.authorid = a.authorid
                                     LEFT JOIN serendipity_entrycat ec
                                                   ON e.id = ec.entryid LEFT JOIN serendipity_category c
                                               ON ec.categoryid = c.categoryid LEFT JOIN serendipity_authorgroups AS acl_a
                                           ON acl_a.authorid = 1
                                    LEFT JOIN serendipity_access AS acl_acc
                                           ON (    acl_acc.artifact_mode = 'read'
                                               AND acl_acc.artifact_type = 'category'
                                               AND acl_acc.artifact_id   = c.categoryid
                                              )
                             WHERE
                                    e.id LIKE '1'
                                     AND e.isdraft = 'false'  AND e.timestamp <= 1206483300 AND     (
                                         c.categoryid IS NULL
                                         OR ( acl_acc.groupid = acl_a.groupid OR acl_acc.groupid = 0)
                                         OR ( acl_acc.artifact_id IS NULL

                                            )
                                       )
                             LIMIT  1
Maybe it is not a problem with my permalinks.

I did a complete new install of s9y today, installed no plugins and changed only the "URL-Formung" (sorry i did not know the english word) option to: use apache mod_rewrite.

Posted: Wed Mar 26, 2008 11:03 am
by garvinhicking
Hi!

Ah, you should've mentioned this as well :)

Yes, Recent PGSql simply dropped the typecasting and broke backwards compatibility. Either you need to downgrade your Postgresql, complain at the developers corner, or try the recent s9y 1.4 alpha snapshots, where we added stricter checks.

Sadly this can break much more inside s9y, so the PGSql way of dropping this typecasting is a bad thing to do to any running application that depends on this functionality.

Best regards,
Garvin