User tests: Successful: Unsuccessful:
Pull Request for Issue #15554 .
removed the odd calculation line in the helper file
$this->size = number_format((float) $this->size + (float) $size, 2, JText::_('DECIMALS_SEPARATOR'), JText::_('THOUSANDS_SEPARATOR'));
which is:
and several files with a division through 1024, resulting in floating calculation
Run a website with caching enabled
Backend > Clear Cache, do only list the cached directories
Either install German language for backend or use a huge site with cache sizes > 1MB
Believe it or not, I tested this on a site with about 3164 articles, 1530 menus, 6 languages i.e. en-US, de-DE, fr-FR, zh-CN, zh-TW, and ja-JP, 13654 users registered.
Set error reporting to a maximum
Set cache time to 150 or so (just to keep cached entries long enough for tests and checks
Try to make traffic on the site to generate as much cache as possible
Go to "System > Cache leeren" (= Clear/Purge cache).
=> Same warnings like described in Issue #15554
Compare the shown cache size with the associated directory on your file system, e.g.
Cache Group 0 Size 477.86 kB
File System: [..]/cache/0
Sum of files are different in size when the size is > 1MB or if backend language is e.g. de-DE
Notices are shown, like:
Notice: A non well formed numeric value encountered in /administrator/components/com_cache/views/cache/tmpl/default.php on line 70
759,00 kB
Notice: A non well formed numeric value encountered in /www/htdocs/w00f7959/relaunch-bs3.ghsvs.de/administrator/components/com_cache/views/cache/tmpl/default.php on line 70
24,00 kB
Any other files who uses this updateSize function, this is e.g. virtuemart extension will show
factor 1024 too less cache size for now; i.e. vmfile.php -> changes to:
//$item->updateSize(filesize($path . '/' . $folder . '/' . $file) / 1024);
$item->updateSize(filesize($path . '/' . $folder . '/' . $file));
Please test patch and any feedback welcome!
PS. I have rewritten the test instructions to make it even clearer. (2017-05-12 20:17 UTC) thanks to you @bertmert
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_cache Libraries |
On a clean 3.7.1-dev got without PR no Warnings and similar Size in Folders and Cache Groups.
On a clean 3.7.1-dev got without PR no Warnings and similar Size in Folders and Cache Groups.
With backend language German?
I've tested with 3.7.0, BTW.
Try German. The error (if still exists) becomes earlier obvious then.
@franz-wohlkoenig
I've tested now also with current Staging. The error still exists without patch.
Install German language.
Set backend language to German (Client: Administrator).
Set error reporting to maximum in Joomla configuration.
Activate Cache in configuration and cache plugin (just to collect enough "stuff").
Set Cache time to 150 or so (just to keep cached entries long enough for tests and checks.
Clicki-di-click around in frontend to get enough "stuff" in cache.
Go to "System > Cache leeren" (= Clear/Purge cache).
=> Same warnings like described in Issue #15554
=> Wrong sizes like described by @oe1tkt (e.g. mod_menu 170 kByte or so instead of measured ~3MB).
Applied patch: All fine.
@franz-wohlkoenig Please be so friendly and test again with more cache or in the backend language German.
@oe1tkt Backend Language was set on German (you see in first Screenshot Table-Heads in German).
@franz-wohlkoenig As you see com_content has in real 51kB and shown 44kB, i.e. because german comma is a , - so it ignores the numbers after that comma. Or at your mod_menu, it shows 15kB instead of 26kB. But when you create much more cache e.g. > 1 MB per item, you will see extremly strange amounts. Here are my results without patch:
and with my patch:
I have tested this item
I didn't managed to get the notice but the cache size is wrong, easy to demonstrate when you toggle the back-end in various languages (English, German, French), the patch fix it. Extensions relying on updateSize are anyway suffering from the language formatting.
I'm posting results below.
Extensions relying on updateSize are anyway suffering from the language formatting.
I cant see how a presumably they are accessing the size directly and not with formatting
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Labels |
Added:
?
|
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-06 19:18:42 |
Closed_By | ⇒ | rdeutz |
I have tested this item✅ successfully on fc48eef
Solved my issue #15554 .
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15964.