JHtmlBehavior::keepalive()
contains the following line:
var myAjax = new Request({method: "get", url: "index.php"}).send();
This is often a bad request when using SEF urls. Say I have a page like: http://www.mysite.com/some/nested/item/
. Now, when this page executes the keepalive code, it sends a request to the server for http://www.mysite.com/some/nested/item/index.php
which results in either a 404 or maybe a redirect. If the 'url' field is omitted from the options object, the request will just be for the current page, which is probably what we really want.
I haven't quite gotten to the bottom of it yet but something about this code seems to (sometimes) result in multiple requests per second being made to the server. It can get pretty intense and actually drive the CPU usage up dramatically on weaker servers.
The issue is in how Joomla sets tag in the header. Basically the line in:
https://github.com/joomla/joomla-cms/blob/master/includes/application.php#L199
breaks all relative URLs and causes a lot of complications. In Kunena we make base url empty to greatly simplify the anchor links in our pages and there seems to be no side effect of doing so.
@mahagr Well sure but changing the base url at this point would probably cause some issues. There are simpler ways to fix this.
What happens in Kunena if you install in some subdirectory? Like: www.mygreatkunenasite.com/actuallinstallationdir/
Do your links still work?
Yes, they work just fine. But you're right that base should in reality point to Joomla base directory to get all relative links to work.
Well, maybe we should look into that. I've never been too crazy about the way Joomla deals with relative links. It's kind of hacky. But this is not really the issue with the keepalive code.
I think we need to fix the issue but also there was a reason this was done during the 1.5 release. I'm trying to remember the details, but it definitely was solving a problem. I'm going to see if I can find out what it was.
Thanks for reporting this. At this time we are only using github as the place to submit code fixes so I am closing the report here. The actual reporting of issues and testing fixes is still taking place on Joomlacode.
As it has been some time since you opened this issue can you please confirm that it is still valid with the current Master or Joomla 3.2 beta.
If it is still valid please can you open an item on the Joomlacode tracker in the appropriate area.
CMS Bug Reports: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8103
CMS Feature Requests: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8549
Labels |
Added:
?
Removed: ? ? |
||
Build | ⇒ | staging |
Oh, one more thing. This function was part of the
Joomla Platform
but seems to be gone from theJoomla Framework
so what's the story with it? Is it going away completely or becoming part of the cms library or something else?