-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache issue for POST request #268
Comments
Please open a tracker on joomalcode and propose a patch with test instructions. |
Thanks for posting this, Joe! Can you send a pull request? If you need to learn how, check out this tutorial: I also created a tracker item for this issue: You can receive notifications from it by signing in, going to the item, and clicking "Monitor Item" in the left column. While we’re transitioning to a new integrated tracker, the JoomlaCode tracker is where we do most of Joomla's bug fixing. You can find out more about the process at: I'm going to close this item, since we have the above JoomlaCode Tracker Item. If and when you submit a pull request, please reference the JoomlaCode Tracker Item URL: Let me know if you have any questions and I'll be glad to answer. Thanks again, Joe! |
* client fixup # Conflicts: # administrator/components/com_media/resources/scripts/components/app.vue # administrator/components/com_media/resources/scripts/store/state.js # media/com_media/js/mediamanager.js added permalink implementation * client fixup # Conflicts: # administrator/components/com_media/resources/scripts/components/app.vue # administrator/components/com_media/resources/scripts/store/state.js # media/com_media/js/mediamanager.js added permalink definition * client fixup # Conflicts: # administrator/components/com_media/resources/scripts/components/app.vue # administrator/components/com_media/resources/scripts/store/state.js # media/com_media/js/mediamanager.js added permalink definition * client fixup # Conflicts: # administrator/components/com_media/resources/scripts/components/app.vue # administrator/components/com_media/resources/scripts/store/state.js # media/com_media/js/mediamanager.js added permalink * fixed syntax * added thumbnail support * media manager generated * added thumbnail support client fixed * added missing modules * commit * removed space * foo deleted * updated folder * removed redundant namespace * added namespace * fixed return value on getFile * fixed return value on getFile * fixed return value on getFile * updated ignore * changed a bit :D * updated local adapter to use params for images folder * updated local adapter to use params for images folder * updated getPermalink to return an assoc array * updated php doc * updated php doc * updated php doc * updated php doc * updated php doc * updated php doc * updated test * Merge branch 'gsoc17' of https://github.com/joomla-projects/media-manager-improvement into file-serve # Conflicts: # administrator/components/com_media/Model/Api.php * added a new line after return * removed line * removed empty line and renamed method to getUrl * removed additional namespace * fixup * fixup getUrl * fixup getUrl * fixup * fixup * Merge branch 'gsoc17' of https://github.com/joomla-projects/media-manager-improvement into feature/dropbox-plugin # Conflicts: # administrator/components/com_media/Adapter/AdapterInterface.php # administrator/components/com_media/Controller/Api.php # administrator/components/com_media/Model/Api.php # plugins/filesystem/dropbox/dropbox.php # plugins/filesystem/local/Adapter/LocalAdapter.php fixed missing type * added missing variable * rebuilt * removed * updated comment * added new line
Fixing dropdown toolbar buttons
When we enable the system plugin cache enabled, it doesn't work properly with the compojoom comment component.
The newly added comments from the guest doesn't show up until the cached page expired.
After debug and test, we find that Joomla doesn't remove the cached page when received the POST request.
we have fixed this problem in our server with the following method:
in /plugins/system/cache/cache.php 62 lines:
change from:
if ($user->get('guest') && $_SERVER['REQUEST_METHOD'] == 'GET') {
$this->_cache->setCaching(true);
}
to:
if ($user->get('guest') && $_SERVER['REQUEST_METHOD'] == 'GET') {
$this->_cache->setCaching(true);
}else{
$this->_cache->remove();
}
in file /libraries/joomla/cache/controller/page.php change the function
protected function _makeId()
{
return JCache::makeId();
}
to
protected function _makeId()
{
//calculate the cache id according to refer page when post request
$user = JFactory::getUser();
if ($user->get('guest')&& $_SERVER['REQUEST_METHOD'] == 'POST') {
$referer=$_SERVER['HTTP_REFERER'];
if (JURI::isInternal($referer)) {
$referer = '/'.substr($referer, strlen(JURI::base()));
return md5(serialize($referer));
}
}
return JCache::makeId();
}
and add the function:
public function remove(){
$id= $this->_id==null?$this->_makeId():$this->_id;
$group='page';
$this->_id = null;
$this->_group = null;
return $this->cache->remove($id,$group );
}
Hopefully Joomla team can include this fix into the next release.
The text was updated successfully, but these errors were encountered: