-
☆ A M B ☆
- 3,112 Posts
it'd be much better if you show part of your plugin code.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
-
☆ A M B ☆
- 326 Posts
I would, but that's what I'm saying -- there's literally nothing else in the plugin code but an opening PHP tag and die('test'); On the system events tab, OnPageNotFound is checked. There's nothing in the error logs, even if I try to write to it (like it's not triggering at all). It's like it's being ignored completely, regardless of what I do. Have you ever heard of it doing that before?
-
☆ A M B ☆
- 24,524 Posts
Just tried it, and indeed I do get a page with nothing on it but "test". Although if it turns out to be some kind of context issue, that's another matter.
Is it possible that your host is catching page not found and redirecting to their own 404 page before your code can execute?
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
-
☆ A M B ☆
- 326 Posts
Bob: I'm not sure how to tell for sure, but maybe. I just noticed it's also not respecting the error_page system or context setting. Does that help troubleshoot what could be going on? I've got some crazy context stuff going on, so it could be related to that, too.
Ah ha! I've been waiting for a tricky Plugin question. Unfortunately I've already experienced this issue.
Check all of your Plugins with OnPageNotFound. Make sure each has a unique priority. And make sure they are consecutive from 0. If there are gaps, sometimes MODx won't fire the later ones. If they share a priority, which one MODx calls is based on which is loaded first (which is not entirely deterministic).
Plugins to watch out for: ArchivistFurl and ArticlesPlugin often come with the same priority. If you make a custom Plugin or install others like a mobile redirector or custom aliasing, most often they are not placed in the correct run order.
-
☆ A M B ☆
- 326 Posts
That's a really really good suggestion and I'll try to remember this in the future, but unfortunately, I checked and it's the only OnPageNotFound plugin I have. Maybe this still is your chance at a tricky Plugin question!
Honestly, I have a feeling I'm doing some silly, but I can not figure it out for the life of me. My guess is an issue with a rather complex contexts setup, but I still can't pinpoint it.
If you have Articles installed, Fuzzicallogic probably hit the nail on the head. The Articles plugin responds to the OnPageNotFound event and calls its own router.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
-
☆ A M B ☆
- 326 Posts
Nope, no Articles here. Just complex context routing that I'd be glad to go into, if anyone can help with that area.