modxcms / Articles

Blog Custom Resource Type for MODX
17 stars 31 forks source link

ArticlePlugin hijacks the Page Not Found if the URL matches the alias #37

Open eprochasson opened 11 years ago

eprochasson commented 11 years ago

Hi,

my blog has the alias news/

I have a dead page name whatever_news/whatever. The Article plugins shortcut the 404 and instead redirect to the blog. I haven't found a fix yet.

I think the culprit is the line:

if ($alias && strpos($search,$alias) !== false)

from articlerouter.class.php (around line 60). strpos is a bit too lose and will match pretty much anything. Shouldn't we try to match the actual URL of the blog?

jpdevries commented 11 years ago

Thanks for reporting this. It looks like that is likely the case 

— Sent from Mailbox for iPhone

On Tue, Oct 22, 2013 at 9:03 PM, Emmanuel Prochasson notifications@github.com wrote:

Hi, my blog has the alias news/ I have a dead page name whatever_news/whatever. The Article plugins shortcut the 404 and instead redirect to the blog. I haven't found a fix yet. I think the culprit is the line:

if ($alias && strpos($search,$alias) !== false)

from articlerouter.class.php (around line 60). strpos is a bit too lose and will match pretty much anything. Shouldn't we try to match the actual URL of the blog?

Reply to this email directly or view it on GitHub: https://github.com/modxcms/Articles/issues/37

opengeek commented 10 years ago

@eprochasson Can you confirm this is occurring using 1.7.3-pl on Revo 2.2.10-pl? I cannot reproduce.