Keyword

K2 Item URL sometimes shows 404 page not found error

  • Mr_Anonymous
  • Mr_Anonymous's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 10 months ago #145173 by Mr_Anonymous
Hi,

I have this problem sometimes to the K2 Items. Occasionally, the K2 Item URL shows a 404 page not found error while most of the time the exact url works fine. This is very strange because the URL is correct but many times it works fine. But there are these odd times out of no reason it will show 'page not found' and when the page refreshed again, it will take to the correct article url. This issue is very inconsistent and doesn't happy all the time. Hence troubleshooting is difficult for me. I will give you more info on this and hoping you can help me out here please:

1) I have K2 SEF URL enabled with only the item alias in url and without the item id.

2) I have created the menu items for the K2 categories. Hence my item sef url looks like this: "www.example.com/category/this-is-k2-item". In this, 'category' is the menu item of K2 category and 'this-is-k2-item' is the SEF url for the k2 item.

3) I do not have any SEF Extension installed. I only use the inbuilt k2 sef feature.

4) After many test I noticed that this 'page not found' error happens when users come to the url from a Social Network site or from Acymailing Newsletter. I am not sure, but I am wondering if additional characters added to the URL is causing this error. I mean, Acymailing newsletters usually can add something like '?acm=123' at the end of the url link for tracking purposes. Similarly, even social network sites rewrites the url and redirects to the correct url after user clicks it. So far, I noticed the 404 seems to happen only in these cases But what is difficult is, it doesnt happen all the time hence making it hard to figure out the exact cause for it. But it does happen often enough that my users are reporting this issue.

Does it make sense on why this could happen? How can I resolve this? I have also considered the following options but none of them seems to be doable for me. But I would reconsider it if one of these is my only option to resolve it:

1) Change SEF Settings to include K2 item number: Its too late for me to change the sef url setting to include k2 item id in it since I already have over 5,000 articles indexed. Changing this setting now will cause more damage to the already indexed urls, isint it?

2) Item Menu Items: Although this might be doable, creating menu items for each K2 items is a lot of work! Even if that is my only option to resolve it, I worried what will happen to Joomla performance when I have like 5,000 menu items created.

3) SEF Extensions: I dont want to use a third party sef extensions neither. Since most of the time, the sef extensions cause more trouble than fixes especially when working with multiple components.

I have Joomla 3.3.3 with K2 2.6.9 installed. There are no problem with my Nginx configuration. This issue seems to be coming from the Joomla-K2 end.

I am out of ideas on how to approach this odd behaviour. Can you help please?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #145185 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Item URL sometimes shows 404 page not found error
Do you have any extensions that block querystings (all or some)?
Are ?template=system , ?tp=1 ( you get the pattern ) working?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mr_Anonymous
  • Mr_Anonymous's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 9 months ago #145214 by Mr_Anonymous
Replied by Mr_Anonymous on topic K2 Item URL sometimes shows 404 page not found error
Hi Krikore,

Thank you for writing to me. Hope you are doing well. :)

I do have Admin tools installed that have the following enabled:

1) Block tmpl=foo system template switch

2) Block template=foo site template switch

I dont see any other query string that could be blocked.

Do I need to disable the above 2? (I have disabled them for now). Could the above cause the behaviour I had mentioned earlier? If yes, I am curious how it could happen since the Acymailing newsletter link nor Social Network links doesnt add 'template' parameters and why it doesnt fail all the time.

Thanks,
Neel.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 9 months ago #145224 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Item URL sometimes shows 404 page not found error
I 'm fine mate, you are you doing?

It could be Admin Tools blocking all querystrings.
The ?utm=source&campaign= (you know the pattern) is being added from Social media sites. This is why I believe this might be a misconfiguration (I do not think this is a hickup) of Admin Tools.

Can you disable this setting and try again?

There is a slight (do not panic) that your site was compromised.
There was a hack, some time ago that when the refferer was FB, Google, twitter the site was redirecting to Google.
Normal links where still functioning. That however was really targeted and I do not think that this is a real possibility.

Just to make sure, can you check your .php files ( any files ) for any code that shouldn 't be there? Especially any eval() or base_64_encode() stuff.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mr_Anonymous
  • Mr_Anonymous's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 9 months ago #145239 by Mr_Anonymous
Replied by Mr_Anonymous on topic K2 Item URL sometimes shows 404 page not found error
Hi Krikore, I am doing okay. Thanks for asking :)

Regarding the site compromised, I doubt it too like you said mainly because the 404 error only happens occasionally and its not consistent and also this error happens from acymailing newsletter links too and not just SN links. Anyhow, I will do a scan on the php files like you suggested. Its always better to be safe I guess.

I have now disabled those 2 settings from Admin tools (unblocked tmpl=foo and template=foo switch). I dont have any other query string restrictions set-up from what I can see from the Admin Tools configurations. Right now, a lot of filters from Admin Tools are disabled since each of them had caused some issue or the other with some components. Anyhow, after your response, I am beginning to understand that this issue might not really be from K2 like I presumed at the beginning. I thought maybe the sef url with no item id occasionally failed to locate the page for some reason and causing 404 error. Now it does seem more like the query strings related issue which is not K2's problem. Anyhow, I will monitor it and see how it goes from here on.

Thanks again Krikore for your support. You have always been helpful. :)

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 9 months ago #145244 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Item URL sometimes shows 404 page not found error
Exactly better be safe than sorry.

I thought maybe the sef url with no item id occasionally failed to locate the page for some reason and causing 404 error.


This is an actual issue though. If two items have the exact same alias, since there is no way to differentiate them, the first occurrence will always be loaded.

Let me know how your research is going.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mr_Anonymous
  • Mr_Anonymous's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 9 months ago #145393 by Mr_Anonymous
Replied by Mr_Anonymous on topic K2 Item URL sometimes shows 404 page not found error
Hi Krikore, Unfortunately the issue still happens. When I clicked on the item link that was added to facebook page, a few times it showed the 404 page. From my desktop Chrome, I got the 404 error 2 times out of 30 clicks I tried and from my iPad I had 8 times out of 30 clicks. The URL that showed on the 404 page was clean with no query string. When I refreshed the page, it page showed correctly. There are no conflicts with the Aliases. I also scanned the php files and I did not find anything suspicious on that. The error happens when the url comes from other source and for some strange reason Joomla shows the 404 page when it clearly exists. I dont seem to have any problem with internal links within the website afaik. Could is be related to Joomla? Is there anything in Joomla that could show a 404 error and fails to pick-up the url sometimes when it exists? The error is not consistent so its hard to catch it. When I had the console and everything ready and tried it many times, it didint happen. But randomly, this happens.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 9 months ago #145419 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Item URL sometimes shows 404 page not found error
Have you checked your error_log?

Also is it possible to deactivate your site's caching?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum