• Home
  • Get help
  • Ask a question
Last post 10 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67889
All time tickets 10493
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#1448 – sh404sef and jotcache

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 26 November 2015 08:59 UTC
Marcus
Hi
You previously told me that if I want to use 'add a suffix' in sh404sef I need to set 'Adds Suffix to URL' to No in Joomla Global configuration, because it does not work if 'Adds Suffix to URL' is set to yes.
Although it sounds wrong, this does make sh404sef work. However it stops sh404sef from working with jotcache.
Is there a solution that allows a suffix to be added to urls and also jotcache to be used with sh404sef?

Thanks for your help
Thursday, 26 November 2015 14:27 UTC
wb_weeblr
Hi

You previously told me that if I want to use 'add a suffix' in sh404sef I need to set 'Adds Suffix to URL' to No in Joomla Global configuration, because it does not work if 'Adds Suffix to URL' is set to yes.
No, you said that. I never said anything close to that.

However it stops sh404sef from working with jotcache.
How can URL suffix be related to jotcache?

We are talking inside a vacuum here. What are real URLs? What are the "problems" with Jotcache? what are the problems when you enable the suffix?

In your previous thread, you never explained what the problem was ("the page load fails".. which has no meaning). I think you're going to have a bit more accurate and complete in your requests, otherwise it's going to be difficult to really get to the gist of it.

Rgds
 
Thursday, 26 November 2015 14:56 UTC
Marcus
Ok, I will try to ask the question in simpler terms in case I am sounding confusing:

what settings can I use in sh404sef and in joomla global configuration in order that sh404sef allows a suffix of .php to be added to all articles and also works with jotcache?

If it helps, the problem at the moment is:

- I need to use jotcache but it currently fails to cache any pages at all.
- I tried turning other plugins off until it worked. it was only when I turned off sh404sef that jotcache started to correctly cache pages.
- I then tried changing individual settings to see if I could isolate the problem. It became clear that having 'Adds Suffix to URL' set to No in global configuration was at least part of the problem.
- the reason I have that set to 'No' is because that is the only way to make sh404sef work when adding a suffix. I do need to add a suffix but as I explained in my earlier query that doesn't work unless this is set to 'No'.

Hope that is clearer

Thanks
Thursday, 26 November 2015 15:30 UTC
wb_weeblr
Hi

what settings can I use in sh404sef and in joomla global configuration in order that sh404sef allows a suffix of .php to be added to all articles and also works with jotcache?
As per the doc, there is only one configuration possible: enter the suffix in sh404SEF config.

You can then enable it in Joomla, but as the docs says "this is not used by sh404SEF, it's only for other extensions which may not work otherwise".

You want to use ".php". It may work or it may not work depending on what extensions you use on your site and what you do with them.

Simply put: Joomla is not compatible with anything else than ".html". So using something like ".php" with sh404SEF will usually work, unless other extensions are not happy with it.

- I need to use jotcache but it currently fails to cache any pages at all.


- I tried turning other plugins off until it worked. it was only when I turned off sh404sef that jotcache started to correctly cache pages.
That doesn't mean there's any problem with sh404SEF.
- I then tried changing individual settings to see if I could isolate the problem. It became clear that having 'Adds Suffix to URL' set to No in global configuration was at least part of the problem.
I think you got the facts good, but you draw the wrong conclusions: it looks like it's jotcache having a problem with a non-standard suffix (ie different from .html)

only way to make sh404sef work when adding a suffix
What does "work" means? what happens?

Rgds
 
Thursday, 26 November 2015 16:11 UTC
Marcus
In answer to your question, if I change the 'Adds Suffix to URL' to yes and make no other changes at all pages all give a 404 response ie they do not load.

This is partly what confuses me and is giving me problems. You say

You can then enable it in Joomla, but as the docs says "this is not used by sh404SEF, ..."

...but if it is not used by sh404SEF why do I get 404 pages as soon as I change it?

Cheers
Thursday, 26 November 2015 16:39 UTC
wb_weeblr
Hi

...but if it is not used by sh404SEF why do I get 404 pages as soon as I change it?
Most likely because you're mixing up two unrelated things.

You assume that the 404 are caused by sh404SEF, which is not the only option. Most likely, this is your server causing those 404.

Can you cause such a 404 and take a screen shot of the resulting screen? (monosnap.com is cool for that)

Rgds
 
Thursday, 26 November 2015 17:27 UTC
Marcus
The 404 page doesn't have any information, it is just a yootheme custom 404 page, but I have found the same problem with different templates and also on both localhost (with xampp) and on a live site (with siteground hosting) so I don't think it is server setup.

Is there a way I can run a 404 page to give more information about the error? I tried 'development error reporting' in joomla but there is no useful information.

Are you able to reproduce the problem there if you set a suffix of .php ?

Cheers
Thursday, 26 November 2015 18:29 UTC
wb_weeblr
Hi

Yes, I can reproduce that. I looked into the code and indeed, Joomla will simply not accept any other suffix than "html". It's hardcoded. sh404SEF decodes the URL fine, but Joomla just won't accept it.

...but if it is not used by sh404SEF why do I get 404 pages as soon as I change it?
Because sh404SEF decodes the URL correctly, and sets the internal non-sef variables to the correct values, but Joomla overrides that and change back the "format" variable. sh404SEF sets it to "html", which is correct, but Joomla changes that back to "php". And php is not a valid page type, so when rendering the page, Joomla fails and throws a 404.

So your only choice if you want to keep those php suffix is indeed to disable the SEF suffix in Joomla config and live with the warning message on sh404SEF control panel. And like the warning says, it may cause issues with other extensions, namely JotCache.

[EDIT]So you're lucky, I stumbled upon a customer site backup with JotCache on it, and I spent some times debugging it. It's indeed JotCache causing the problem, but it's simpler than expected and I can see that you never asked them about it. They would have immediately answered: JotCache is specifically coded to exclude any .php file from caching (at the very end of their system plugin).

Rgds
 
Friday, 27 November 2015 07:08 UTC
Marcus
Thanks very much for the explanation.

I also apologise for jumping to the wrong conclusion and assuming that sh404sef was at fault. I will know better in future!

Thanks very much for your help yesterday and have a nice day.
Friday, 27 November 2015 08:04 UTC
wb_weeblr
Hi

No problem. Closing this ticket now, feel free to open a new one as needed. If you do so, please mention this ticket number in the new one.


Rgds
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.