J3 Issue ?
avatar alagesanbe08
alagesanbe08
7 Nov 2017

Steps to reproduce the issue

This warning show only for Guest user, When enable conservative cache
global_configuration_-j2store-_administration

it show warning like this
english_home

For other user, no warning message

System information (as much as possible)

PHP Built On: Linux joomlatools 4.2.0-27-generic 32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64
Database Version: 5.5.47-0ubuntu0.14.04.1
Database Collation: utf8_general_ci
PHP Version: 7.1.2
Web Server: Apache/2.4.18 (Ubuntu)
Joomla! Version: Joomla! 3.8.1 Stable
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0

Votes

# of Users Experiencing Issue
1/2
Average Importance Score
4.00

avatar alagesanbe08 alagesanbe08 - open - 7 Nov 2017
avatar joomla-cms-bot joomla-cms-bot - change - 7 Nov 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Nov 2017
Category com_cache
avatar alagesanbe08 alagesanbe08 - change - 7 Nov 2017
Title
Joomla\CMS\Cache\Storage\FileStorage::_deleteFolder JFolder: :delete: Could not delete folder. Path: /var/www/j2store/cache/com_content
Joomla\CMS\Cache\Storage\FileStorage::_deleteFolder JFolder: :delete: Could not delete folder
avatar alagesanbe08 alagesanbe08 - edited - 7 Nov 2017
avatar mbabker
mbabker - comment - 7 Nov 2017

The caching layer is usually disabled when a user is logged in for the frontend facing content (actual component and module output). So it's expected that only non-logged in users would see it.

As for the source of the issue, I'd suggest starting with validating the permissions on your server are correct.

avatar alagesanbe08
alagesanbe08 - comment - 7 Nov 2017

i am using vagrant and also checked with 777 permission but no luck :)

avatar landed1
landed1 - comment - 7 Nov 2017

I also have this issue and checked the folder permissions are correct. I am going to be playing with the path in the config a little as I saw some other issues that mentioned that. I am running php 7.
I do have old config lines that are memcache related from when I used memcache on older php version I will try to remove some of them.

avatar landed1
landed1 - comment - 7 Nov 2017

I have tried setting a manual path in config, and also creating a new custom cache directory and changing the path to that. The line of code that gives the error is happening in a plugin onContentPrepare and is

$cache = JFactory::getCache();
$cache->clean('com_content');

Is it possible the frequency of this getting called is triggering the issue? I did not see this looping for example but I am trying to understand why that folder might be unavailable, though it is consistent so probably not a latency/write issue.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18517.

avatar csthomas
csthomas - comment - 7 Nov 2017

Is it possible the frequency of this getting called is triggering the issue?

Yes.
File cache cleaning does not use any file locking mechanism.

If we have 2 simulated requests and the first one is cleaning the cache directory /cache/* and the second one is creating a new cache file at /cache/com_content/xxxxxxxx.php then clean() will cause an error because it can not delete folder /cache/com_content/ because there is still a file.

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Nov 2017
Status New Discussion
avatar ggppdk
ggppdk - comment - 11 Nov 2017

Yes. File cache cleaning does not use any file locking mechanism.
If we have 2 simulated requests and the first one is cleaning the cache directory /cache/* and the second one is creating a new cache file at /cache/com_content/xxxxxxxx.php then clean() will cause an error because it can not delete folder /cache/com_content/ because there is still a file.

I have encountered this in our component, it is indeed due to locked files inside
the component cache subfolder inside /cache/com_somecomponent/somefile.php

But,
besides having 2 simultaneous requests,
it can occur also due to a module trying to clean the component cache
(i decided to remove that code cleaning as it is was not really needed)


So it is similar to report by @landed1

The line of code that gives the error is happening in a plugin onContentPrepare and is
$cache = JFactory::getCache();
$cache->clean('com_content');

Does it make sense to remove the generated warning ?

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jul 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-07-05 08:25:53
Closed_By joomla-cms-bot
avatar alikon alikon - change - 5 Jul 2019
Closed_By joomla-cms-bot alikon
avatar joomla-cms-bot joomla-cms-bot - close - 5 Jul 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 5 Jul 2019

Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/18517

avatar alikon
alikon - comment - 5 Jul 2019

expected behaviour


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18517.

avatar nguyenlong89
nguyenlong89 - comment - 9 May 2020

Can you explain more @landed1:
I am using J3.9.16 but I don't know where that code is located

$cache = JFactory::getCache();
$cache->clean('com_content');

Add a Comment

Login with GitHub to post a comment