Article from Categories 404ing, a forum discussion on Jojo CMS. Join us for more discussions on Article from Categories 404ing on our Plugin Support forum.
You must be logged in to post a reply
| |
Hi Guys, with the bug tracker down, I'll throw this here...
I've just come across a rather annoying bug with using Article Categories that have nested URLs. With categories enabled with say two categories (posts/official, and posts/rants)... something in the Jojo core is rewriting the page URL after isArticleUrl() is called but before _getContent().
Eg: a post that should be located at "/posts/rants/post-name/" is being redirected to "/posts/official/post-name/" just because the "posts/official" page is earlier in the table. The page then of course 404s because the path is wrong.
Inside _getContent() and _getPrefix() the page URL is now the URL of the first page in the database with the appropriate pg_link.
It works fine if the category URLs are only one level deep (can still be nested in menu, of course), but not when the URLs.
I've been digging for a little bit now and can't find what's changing the page URL. Is someone able to point me in the right direction?
I've just come across a rather annoying bug with using Article Categories that have nested URLs. With categories enabled with say two categories (posts/official, and posts/rants)... something in the Jojo core is rewriting the page URL after isArticleUrl() is called but before _getContent().
Eg: a post that should be located at "/posts/rants/post-name/" is being redirected to "/posts/official/post-name/" just because the "posts/official" page is earlier in the table. The page then of course 404s because the path is wrong.
Inside _getContent() and _getPrefix() the page URL is now the URL of the first page in the database with the appropriate pg_link.
It works fine if the category URLs are only one level deep (can still be nested in menu, of course), but not when the URLs.
I've been digging for a little bit now and can't find what's changing the page URL. Is someone able to point me in the right direction?
I have a feeling it's the url matching in isUrl . I don't think the regex is intelligent enough to cope with slashes in the url (it took me ages to work out why it didn't like hyphens either). The whole category system is a bit of a hack built to solve a need at the time, but could do with overhauling into something more intelligent.
| Back to Forum Index : Back to Plugin Support |
|
