View Issue Details

IDProjectCategoryView StatusLast Update
1945Composr alpha bug reportsGeneral / Uncategorisedpublic2015-06-09 14:42
ReporterJason Verhagen Assigned ToChris Graham  
PrioritynormalSeverityfeature 
Status resolvedResolutionfixed 
Summary1945: Pre-compressed CSS/JS isn't working.
DescriptionPossible bug/typo in sources\css_and_js.php in compress_cms_stub_file() function at line 200:

$myfile = @fopen($stub_file . '.gz', GOOGLE_APPENGINE ? 'wb' : 'at');

I tried using the recommended.htaccess file to take advantage of the pre-compressed CSS and JS, but the .gz files generated in templates_cached were corrupted. I couldn't find any reference for fopen mode 'at'. I suspected the 'at' might have been meant to be 'a+' and made the change. Changing 'at' to 'a+' and clearing the template cache gave me good .gz files. Just in case it's an environmental issue with my setup, I'm running Windows 7 Ultimate OS with XAMPP (Apache v2.4.12, mySQL v5.6.24, and PHP v5.6.8).
TagsNo tags attached.
Attach Tags
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Jason Verhagen

2015-06-03 02:17

developer   ~2872

Last edited: 2015-06-03 02:19

I found the PHP reference for the 't' (text translation) part of the 'at' fopen mode. The 'at' should be 'ab' for the binary .gz file.

Jason Verhagen

2015-06-03 03:11

developer   ~2874

I committed a change to sources\css_and_js.php to change the 'at' fopen mode to 'ab'. If that is correct, this ticket can be closed :)

Chris Graham

2015-06-09 14:41

administrator   ~2894

Thanks Jason :)

Issue History

Date Modified Username Field Change
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised