Articles icon indicating copy to clipboard operation
Articles copied to clipboard

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

Open eprochasson opened this issue 11 years ago • 2 comments

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?

eprochasson avatar Oct 23 '13 04:10 eprochasson

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 [email protected] 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

jpdevries avatar Oct 23 '13 04:10 jpdevries

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

opengeek avatar Dec 05 '13 02:12 opengeek