[ php-blog-Bugs-1461069 ] PAT_COMMENTSUB issues with minimal permalinks
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.serendipity.trackers |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1461069, was opened at 2006-03-29 20:26
Message generated for change (Comment added) made by jgoerzen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1461069&group_id=75065
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Frontend functions
Group: None
Status: Open
Resolution: Accepted
Priority: 6
Submitted By: John Goerzen (jgoerzen)
Assigned to: Garvin Hicking (garvinhicking)
Summary: PAT_COMMENTSUB issues with minimal permalinks
Initial Comment:
I've been trying to figure out why the hit counter in
the karma plugin wasn't working, and I've tracked it
down to PAT_COMMENTSUB.
in functions_permalinks.inc.php, it's defined as:
@define('PAT_COMMENTSUB', '@/([0-9]+)[_\-][' .
PAT_FILENAME . ']*\.html@i');
My permalink for articles, though, is:
posts/%id%.html
Changing the one line to:
@define('PAT_COMMENTSUB', '@/([0-9]+)[_\-]?[' .
PAT_FILENAME . ']*\.html@i');
Fixes the hit counter!
The problem was that the existing pattern requires a
dash or an underscore, but I am not using one.
Now, I haven't tested it for people that do use names
and whatnot, but it seems to work OK for me.
It's also not documented anywhere that permalinks are
supposed to conform to this rigid structure.
-- John
----------------------------------------------------------------------
>Comment By: John Goerzen (jgoerzen)
Date: 2006-03-30 09:55
Message:
Logged In: YES
user_id=491567
Fair enough. It might be nice, though, to at least add
something for the 1.0 release on the Configuration screen.
It could say something like "Make sure you include two
variables separated by an underscore or a hyphen, or else
URL parsing in some plugins could be broken."
----------------------------------------------------------------------
Comment By: Garvin Hicking (garvinhicking)
Date: 2006-03-30 04:44
Message:
Logged In: YES
user_id=473563
I can conform that this causes trouble. Adding the "?"
optional thing will make problems in other areas, I'm quite
sure, because the PAT_COMMENTSUB pattern might then be hit
in some other cases.
Custom Permalinks were seldom used with only one %...%
variable, so I guess that's why it's not yet documented. I
will need to look thoroughly into this, but I won't be able
to do that in the 1.0 release cycle yet, because it would
most certainly introduce borkage in some areas. That'S why I
'd rather choose the way were it's buggy with the
posts/%id%.html permalink and which users do not use often,
than to fix up this and open other problems for our stable
release. ;)
Many thanks for reporintg this.
Regards,
Garvin
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1461069&group_id=75065
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642