szepeviktor / w3-total-cache-fixed

A community driven build of W3 Total Cache. The aim is to continuously incorporate fixes, improvements, and enhancements over the official WordPress release of W3 Total Cache.
https://github.com/szepeviktor/w3-total-cache-fixed/releases
MIT License
237 stars 47 forks source link

W3TC on WP has been updated to 0.9.5.4 #468

Closed cesco69 closed 7 years ago

cesco69 commented 7 years ago

Official w3tc seem not have imported all changes from w3tc-fix changelog.

Official changelog 0.9.5.4

szepeviktor commented 7 years ago

Could we make a list of not imported changes?

szepeviktor commented 7 years ago

File changes divided into three: https://github.com/szepeviktor/w3-total-cache-fixed/commits/upstream

nigrosimone commented 7 years ago

TL;TR

the new w3tc release (0.9.5.4) has rejected/ignored the most parts of our changes. SEE BELOW

On 50+ bug fixes and improvements, only 5/6 are merged in the latest release. A bit seems fixed in a different way, but the the most are rejected/ignored.

Happy to see my name into the changelog, but honestly i will preferred to see the most parts of our works merged into the latest version.

I have send a mail on each important bug fix (with rarely responses). These folks know this project, know these bugs (some are fatal errors) and after 3 months don't have fixed.

sorry but i'm a bit discouraged, maybe it's time to leave this project and use my free time for a useful project.

Accept/Present

  1. [x] Gzipped Cached Pages Are Not Decoded Correctly – PHP 5.3.x Specific
  2. [x] CSSTidy Updated to v1.5.5 With New Options – Requires PHP 5.4+
  3. [x] Admin Image URLs Malformed For Must-Use Plugins (mu-plugins)
  4. [x] Additional Home URLs (set in Page Cache) not Purging
  5. [x] Undefined Variable: _is_ampendpoint

Rejected/absent

  1. [ ] Dashboard Widget For Flushing Individual User-Inputted URLs
  2. [ ] + Extra: #PR335 – Adds Missing Nonce check
  3. [ ] _{uploadsdir} Placeholder & Full URLS Issue In CDN Custom Files Field
  4. [ ] Google PageSpeed Widget – Key Restriction Field Added
  5. [ ] Page Cache – Added 4 New "Never Cache ..." Fields
  6. [ ] + Extra: #PR320 – Adds Missing Check for Page & Post Type
  7. [ ] WP-CLI – Prime the Page Cache (Cache Preload)
  8. [ ] Flushing Not Working Consistently For Post Changes
  9. [ ] Amazon Web Services (AWS) Signature v4 Support & New Locations
  10. [ ] Save Cloudflare Settings – SSL Update Failure
  11. [ ] Rewrite URLs via wp..._attachment_forjs() filter when CDN is Enabled
  12. [ ] + Extra: #PR350 – Checkbox to Use CDN URLs for Media Library
  13. [ ] Malformed HTML in Generated Item UIs (Admin Pages)
  14. [ ] "Security Headers" Section Added to Browser Cache
  15. [ ] + Extra: #PR363 – Adds Default Values to CSP (Security Headers)
  16. [ ] + Extra: #PR377 – Important Change – Session Cookies
  17. [ ] + Extra: #PR436 – Add referrer policy security header
  18. [ ] W3TC is Collecting Tracking Usage At All Times
  19. [ ] Configuration Bug – Redis/Memcached Server Entries
  20. [ ] Error Message: Trying to Get Property of Non-Object
  21. [ ] Page Cache – Accepted Query Strings Enhancement
  22. [ ] Incorrect Use of Removing Query String From URLs
  23. [ ] Enhance _removequery() to Recognize Other Ampersand Forms
  24. [ ] Filter to Set Cache Lifetime Period On A Per-Page Basis
  25. [ ] Warning: _Invalid Arguments in MinifyEnvironment.php
  26. [ ] Feeds Not Caching Nor Serving Back as XML
  27. [ ] + **Extra: – Fix admin setting always disabled on nginx
  28. [ ] Smart Browser Cache Default Settings
  29. [ ] + Extra: #PR395 – A Few More Useful Smart Default Settings
  30. [ ] Expanded Regex Support & Improved Page Cache Cookies
  31. [ ] Debug Mode Not Working
  32. [ ] + Extra: #PR406 – Missed File - Debug Mode Not Working
  33. [ ] PHP Deprecation Notice – _is_commentspopup()
  34. [ ] W3TC-Include-JS-Head Tag Implementation Missing For Auto Mode
  35. [ ] Catch Exceptions Thrown When Saving Config
  36. [ ] Fix feeds on the dashboard
  37. [ ] Make the dashboard responsive
  38. [ ] Deprecated the "Allow, Deny, and Order" directives
  39. [ ] Util_Environment::document_root() On Windows return "/" instead of "\"
  40. [ ] Customize Cache Directory
  41. [ ] YUI Compressor fix for JAVA path
  42. [ ] Closure Compiler fix for JAVA path
  43. [ ] Fixed Redis Test on Admin Dashboard
  44. [ ] Extends "http 2 push" to page cache enhanced
  45. [ ] + Extra: #PR320 – Support for more than 50 assets
  46. [ ] Fixed Object Cache setting cache value on missed gets
  47. [ ] Call to a member function using_index_permalinks() on null
  48. [ ] stristr(): Empty needle
  49. [ ] Media Library Export skips files
  50. [ ] Fixed semicolon bug & added woff2

Deprecated/Refactored

  1. [ ] ~WP Query String Being Stripped Unexpectedly~
charlesLF commented 7 years ago

Thanks for compiling this list, @nigrosimone !

sorry but i'm a bit discouraged, maybe it's time to leave this project and use my free time for a useful project.

would be a shame, but it's totally understandable.

I'd say this is about a good time to diverge away from the upstream. Maybe just porting over any new features from the official version, but otherwise maintaining this community edition as a separate entity. It's been working perfectly on the production environments where I have it deployed, and is way more stable than the official version.

szepeviktor commented 7 years ago

sorry but i'm a bit discouraged, maybe it's time to leave this project and use my free time for a useful project.

Could you make a last release and a note at the top of the readme?

szepeviktor commented 7 years ago

@nigrosimone https://wordpress.org/support/topic/solution-for-50-problems/

szepeviktor commented 7 years ago

@ftownes We are out of the game https://github.com/szepeviktor/w3-total-cache-fixed/issues/468#issuecomment-297788649

szepeviktor commented 7 years ago

@nigrosimone Here is something for you from Frederick

  1. i would like to communicate and collaborate with contributors so that expectations are set on both sides
  2. i appreciate the contributions of developers and the bug reports of users tremendously
  3. i’ve finalized a plan to make w3tc a public repo and intend for it to be so this year
  4. meanwhile, the only way to have alignment about bug fixes getting into the public release is via #1

Could you open a WP Slack account?

nigrosimone commented 7 years ago

Maybe just porting over any new features from the official version

i have tried... but merging the difference is too complicated and require tons of work. It's impossible for me because i can't test all w3tc features and check if the merging is full correct, eg.: i don't have a cdn like Azure or S3, i don't have nginex web server or sql server db... merging without testing is a jump in the dark. But if anyone merge a single testable parts is easy because latest official version has a small amout of changes.

Anyone can help into the merging latest w3tc official release with latest FIX version?

I need attention by all the contributors: @amiga-500, @szepeviktor, @charlesLF, @archon810, @niklasfink, @sbutler, @Crevil, @viawest-davidsix, @mrosenberg

i have also contacted @ftownes on Slack for found a way for make an effective collaboration between the projects.

Furniel commented 7 years ago

nigrosimone

I manually merged almost all patches from your list to original 0.9.5.4. This is my repo. Maybe this will help you with update. Didn't merged only 4 pathes:

First tests shows that everything works, but of course there may be some new bugs.

PS: Thanks for your great work on this project.

Update: Merged Amazon Web Services (AWS) Signature v4 Support & New Locations

nigrosimone commented 7 years ago

@Furniel

many, many, many thank you. Your contribution is very appreciated.

i have merged this prs:

for this pr we need some guy/s with cdn:

it seem already fixed (the code is totally changed)

just a question, are you interested to become a collaborator in this project?

i have created a separate branch https://github.com/szepeviktor/w3-total-cache-fixed/tree/v0.9.5.4.1 with yours and my merges. Can you check if all/my prs works?

there may be some new bugs.

what bugs?

i have also contacted @ftownes on Slack for found a way for make an effective collaboration between the projects.

and after 4 days @ftownes doesn't respond

Could you open a WP Slack account?

@szepeviktor and with slask i have used any avaible channell (mail, facebook, twitter and slack) over one year. @ftownes doesn't respond. Please, try to contact... i don't understand what i doing wrong in communicate with @ftownes.

Furniel commented 7 years ago

@nigrosimone Tested your "Customize Cache Directory" patch and it dosn't work on my test localserver(windows+xampp+php 7.1.1 + redis),instead of minified\combined js\css files browser loads original css\js files).

there may be some new bugs.

Always may be hidden bugs when there are many code changes.

just a question, are you interested to become a collaborator in this project?

I can join now, but i'm not sure about future(web development isn't among my priorities, especially development for wp(now i have\developing only one little site under wordpress and i don't know will i use wp in future or not) ).

Updated self test window to make it more informative screenshot, what do you think?

Update: Merged latest minify lib(2x branch) to w3tc. . Need help with testing and confirmation that nothing broke after update.

deltafactory commented 7 years ago

Thanks for your continued efforts.

Don't expect a response from Fredrick or W3-Edge. He's off working at his other job as apparently W3TC's paid levels weren't enough to build a business around. I've reported bugs through the years over various channels and had no response of any kind.

szepeviktor commented 7 years ago

Welcome @Furniel !

nigrosimone commented 7 years ago

I can join now, but i'm not sure about future

nobody is sure for the future

@szepeviktor, maybe we can elevate @Furniel for collaborator...

what do you think?

great idea!

Update: Merged latest minify lib(2x branch) to w3tc.

Always thanks!

Tested your "Customize Cache Directory" patch and it dosn't work on my test

have you tried in this way? wp-config.php see /** W3 Total Cache cache directory. */:

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

/** W3 Total Cache cache directory. */
define('W3TC_CACHE_DIR', ABSPATH.'w3tc-cache');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

He's off working at his other job as apparently W3TC's paid levels weren't enough to build a business around

@deltafactory i don't understand the reason behind the refuse to accept free worker by community like us.

szepeviktor commented 7 years ago

Guys! Please make sure @Furniel 's first commit it the same as @1646054 in W3TC https://plugins.trac.wordpress.org/log/w3-total-cache/ If yes we can take his commits on top of https://github.com/szepeviktor/w3-total-cache-fixed/commits/upstream

Do we base on 0.9.5.4? or .3?

nigrosimone commented 7 years ago

@Furniel is on 0.9.5.4 https://github.com/Furniel/W3-Total-Cache/blob/master/w3-total-cache.php#L5

nigrosimone commented 7 years ago

@szepeviktor @1646054 is the first commit of 0.9.5.4 https://plugins.trac.wordpress.org/changeset/1646054/w3-total-cache

@1646026 is the first commit of 0.9.5.3 https://plugins.trac.wordpress.org/changeset/1646026/w3-total-cache

deltafactory commented 7 years ago

@nigrosimone I can only think that there's a lack of time, interest, or testing resources to incorporate your fixes or maintain the plugin at all. Hundreds of WP support requests are posted per month, all for a free product.

You're donating your time to make it better but it seems like he and his staff would rather walk away than invest time.

szepeviktor commented 7 years ago

I've meant @Furniel 's first commit in his repo.

Furniel commented 7 years ago

First commit is 1646054(was automatically imported by bitbucket). Progress report:

nigrosimone commented 7 years ago

@szepeviktor can you proceed to merge @Furniel's fork into the upstream? and maybe elevate @Furniel to collaborator?

@Furniel thanks a lot! after the sync with your fork can you follow our update strategy: make a single detailed PRs for each bug fix/improvements. This is useful for have a "help" page for fix a single issue and link them from the w3tc forum. This is an example of what i mean a helpful pr for the community: https://github.com/szepeviktor/w3-total-cache-fixed/pull/313

For anyone want help into the tests, this is the @Furniel's fork https://github.com/Furniel/W3-Total-Cache

szepeviktor commented 7 years ago

First commit is 1646054(was automatically imported by bitbucket).

From this repo? https://bitbucket.org/ArlingtonCounty/w3-total-cache/commits/all

szepeviktor commented 7 years ago

We have a problem. WP.org trunk is different from tags/0.9.5.4 https://plugins.trac.wordpress.org/browser/w3-total-cache/#tags/0.9.5.4/pub For example in pub/apc.php which is not released. What to do now?

szepeviktor commented 7 years ago

Exactly

$ diff -qr 0.9.5.4/ trunk/
Only in trunk/: Cdn_RackSpace_Api_CaCert.pem
Only in trunk/: configs
Only in trunk/: extensions
Only in trunk/: Generic_Plugin_WidgetServices.php
Only in trunk/inc: functions
Only in trunk/inc/options: new_relic.php
Only in trunk/inc/options: pro
Only in trunk/inc/options: support
Only in trunk/inc/widget: new_relic.php
Only in trunk/inc/widget: pagespeed_control.php
Only in trunk/inc/widget: pagespeed.php
Only in trunk/inc/widget: services.php
Only in trunk/inc/widget: spreadtheword.php
Only in trunk/languages: faq-premium-en_US.xml
Only in trunk/lib: CF
Only in trunk/lib: EDD
Only in trunk/lib: Microsoft
Only in trunk/lib/Minify: FirePHP.php
Only in trunk/lib/Minify/Minify/Cache: APC.php
Only in trunk/lib/Minify/Minify/Cache: Eaccelerator.php
Only in trunk/lib/Minify/Minify/Cache: Memcache.php
Only in trunk/lib/Minify/Minify/Cache: Wincache.php
Only in trunk/lib/Minify/Minify/Cache: XCache.php
Only in trunk/lib/Minify: Solar
Only in trunk/lib/NetDNA: CurlException.php
Only in trunk/lib/NewRelic: NewRelicPresentation.php
Only in trunk/lib/OAuth: config.php
Only in trunk/lib/OAuth: NetDNAOAuthClient.php
Only in trunk/lib/OAuth: OAuthClientBase.php
Only in trunk/lib/OAuth: OAuth.php
Only in trunk/lib/OAuth: OAuthService.php
Only in trunk/lib: W3
Only in trunk/pub: apc.php
Only in trunk/pub: files.php
Only in trunk/pub: minify.php
Only in trunk/: UsageStatistics_ConfigLabels.php
Only in trunk/wp-content: w3tc
Furniel commented 7 years ago

@szepeviktor Missed this, created seperate 0.9.5.4 branch and synced it with 0.9.5.4(second commit in branch). This should fix the problem. Be careful master still equals trunk.

szepeviktor commented 7 years ago

We are updated: https://github.com/szepeviktor/w3-total-cache-fixed/commits/upstream @Furniel please watch file permissions. Trunk is normal, your branch has execution bits enabled on every file. Please configure your git setup.

szepeviktor commented 7 years ago

@nigrosimone See https://github.com/szepeviktor/w3-total-cache-fixed/commit/96a0963d587d16bd3be38e7f290d223acc917b82 and notice changes in

OK: https://travis-ci.org/szepeviktor/w3-total-cache-fixed/builds/229205639

szepeviktor commented 7 years ago

@Furniel Imported all of your commits. git cherry-pick ae56f95247ced8d8291ddf109c37d68d724a71a4..c2c08fc67b765e18fce899e370b7dff97ca3084f OK: https://travis-ci.org/szepeviktor/w3-total-cache-fixed/builds/229208256 Thank you for your work.

Please continue here in form of PR-s.

nigrosimone commented 7 years ago

Good news! w3tc developer has revisioned all missed fix and maybe will be added in the next release.

Just a bit are rejected because the developer has found some bug. All rejected fix are reasonable (we have introduced some bugs).

I need attention from all the contributors: @amiga-500, @szepeviktor, @charlesLF, @archon810, @niklasfink, @sbutler, @Crevil, @viawest-davidsix, @mrosenberg

1. Save Cloudflare Settings - SSL Update Failure ok

2. Malformed HTML in Generated Item UIs (Admin Pages) ok

3. Configuration Bug -- Redis/Memcached Server Entries ok

4. PHP Deprecation Notice ok

5. Fix for the feeds on the dashboard to be fixed

6. Fix for Object Cache 'Get' method incorrectly setting cache value fixed more correctly. thanks for bug report, that's the most serious issue from this list.

7. Call to a member function using_index_permalinks() on null ok

8. PHP Warning: stristr(): Empty needle ok

9. Fixed semicolon bug & added woff2 ok

10. Copy&paste comment in opcache.php ok

11. Closure Compiler: fix JAVA path with spaces ok

12. Util_Environment::document_root() On Windows return / instead of \ document_root should return path, i.e. "\"-based path on windows. so bug not in ::document_root, but in code using it later and not converting it to url-mode correctly. fixes like that will fix most of problems but create new ones more difficult to fix in the end. actually you've tried to revert back a fix provided by one of windows users (those realpath addition) :) we dont run tests on windows envs since its rarely used, and even less used for production, so you may help with that a lot.

13. Incorrect Use of Removing Query String From URLs ok

14. "W3TC-Include-JS-Head" Tag Implementation Missing For Auto Mode removed by intent. fundamentally - rarely useful. practicaly - widely misused by theme authors breaking minify as a result. use filters instead.

15. Error Message: "Trying to Get Property of Non-Object" first commit ok, but extended similar check https://github.com/szepeviktor/w3-total-cache-fixed/pull/376/commits/972c0234d6b4939368b67731e6755350c04dbb2ek to other options. https://github.com/szepeviktor/w3-total-cache-fixed/pull/376/commits/972c0234d6b4939368b67731e6755350c04dbb2e is not clear what does it do

16. W3TC is Collecting Tracking Usage At All Times partially accepted (following checkbox, tweeted buAt present the official W3TC is in violation of WP's Plugin Guidelines. tton). remaining is business logic and is out of tech support area. forwarded for further decisions.

17. Fix Redis Test ok but modified since persistent value was taken for OC page only.

18. YUI Compressor: Fix for Empty JAVA executable path and JAVA path with spaces ok

19. Flushing Not Working Consistently For Post Changes fix is dangerous since multiplies count of flushes and hackish, but thank you for bug report. fixed by attaching to actions before update happens.

20. Feeds Not Caching Nor Serving Back as XML ok with modifications

21. Debug Mode Not Working ok with slight modifications

22. Media Library Export skips files ok

23. Deprecated the "Allow, Deny, and Order" directives ok but can be done generating simpler htaccess since we are static to server version (implemented)

24. Add a dashboard widget for flushing URL's ok

25. Page Cache - New Fields ok

26. Amazon Web Services (AWS) Signature v4 Support And New Locations ok (thanks for that required change)

27. WP-CLI - Prime the Page Cache not accepted because cli-only functionality should be separated to own files. right now a lot of code in core files increasing memory consumption for regular runtime operations.

28. Rewrite URLs via wp_..._for_js() filter when CDN is Enabled ok

29. "Security Headers" Section Added to Browser Cache looks interesting, will be added

30. Page Cache - "Accepted Query Strings" Enhancement not accepted, see bug here: $val .= ( strpos( $val, '=' ) === false ? '.*?' : '' ); at 2 places means all querystring keys starting with name specified will match, not only this key and at $rules .= " RewriteCond %{ENV:W3TC_QUERY_STRING} ^(.*?&|)".$query."(&.*|)$ [NC]\n"; insnt ^(.*?&|) a (^|&) ? side note: fixed by https://github.com/szepeviktor/w3-total-cache-fixed/pull/489

31. Enhance "remove_query()" to Recognize Other Ampersand Forms ok

32. Expanded Regex Support & Improved Page Cache Cookies declined since will break many existing setups, it should be enabled at least when minify.cache.files_regexp option checked.

33. Smart Browser Cache Default Settings mostly agree, applied but not all. real serious mistake is enabling "browsercache.html.expires", hope comments are not required why

34. Extends "http 2 push" feature to page cache enhanced
declined for bugs

  1. Doesnt work for home page. htaccess created but not followed by apache some reason.
  2. For /2017/05/23/my-post/ page it collects headers for all headers from /, /2017/, /2017/05/, /2017/05/23/, /2017/05/23/my-post .htaccess files causing 5 times more headers as a result with often redundant files to preload. since those redundant are coming first the final effect is slowdown comparing to even missing headers. side note: fixed by https://github.com/szepeviktor/w3-total-cache-fixed/pull/491

35. Make dashboard responsive OK

szepeviktor commented 7 years ago

OK.

right now a lot of code in core files increasing memory consumption for regular runtime operations

This makes me develop tiny cache series: the_content(), .mo files, nav menus.

nigrosimone commented 7 years ago

This makes me develop...

@szepeviktor you plan to deploy on official wp.org repository?

szepeviktor commented 7 years ago

Yes. But it needs:

szepeviktor commented 7 years ago

I appreciate if you try it.

deltafactory commented 7 years ago

Does this mean that you have an open line of communication with developers at W3 Edge?

szepeviktor commented 7 years ago

AFAIK No, not.

If you have any improvement in mind, please open a PR here.

nigrosimone commented 7 years ago

Does this mean that you have an open line of communication with developers at W3 Edge?

no... this means that sometimes he responds.

archon810 commented 7 years ago

Should we expect another release? I've been waiting to update from 0.9.5.2.4 because of the weird state of things lately.

nigrosimone commented 7 years ago

@archon810 from september 2016, they seem release a version each 3 months...

archon810 commented 7 years ago

@nigrosimone Sorry, I meant from w3-total-cache-fixed, given this comment https://github.com/szepeviktor/w3-total-cache-fixed/issues/468#issuecomment-302854854.

szepeviktor commented 7 years ago

We have 0.9.5.4.1 See https://github.com/szepeviktor/w3-total-cache-fixed/blob/v0.9.5.x/README.md

archon810 commented 7 years ago

@szepeviktor Right, https://github.com/szepeviktor/w3-total-cache-fixed/releases/tag/0.9.5.4.1, but that came out 17 days ago. And the discussion by @nigrosimone I was talking about is from 3 days ago, so I'm wondering if there's going to be another release that incorporates everything talked about 3 days ago.

nigrosimone commented 7 years ago

I talking about incorporate our changes into the official version.

szepeviktor commented 7 years ago

@nigrosimone Have you had the chance to try https://github.com/szepeviktor/wordpress-plugin-construction/blob/master/tiny-cache.php ?

nigrosimone commented 7 years ago

@szepeviktor yes i have tried and (maybe) i have already leave a comment somewhere.

It seem a big improvements only on page based on visual builder with tons of shortcode, but without shortcodes (eg. classic blog posts) there is a minimal improvement.

From my tests, the slowerst part into wordpress ecosystem are: 1) translations: For localized WordPress the loading time of translation files accounts for 30% of the entire processing time (less or more 40 milliseconds per page). For each translation file, WordPress unpacks it and then everyone will be converted in an “Translation_Entry” object. This process, repeated at each page view, is a waste time and resource.

2) menu For each menu, wordpress reads data from the database for each page/post into the menu and elaborated the results. This process, repeated at each page view, is a waste time and resource.

3) visual builder/shortcodes This depend on the single shortcode.

Your approach helps in the scenario 3.

szepeviktor commented 7 years ago

Thank you! It makes me happy as I have the same conclusion.

  1. see https://github.com/szepeviktor/wordpress-plugin-construction/blob/master/tiny-translation-cache.php

  2. see https://github.com/voceconnect/voce-cached-nav/blob/master/voce-cached-nav.php I have a plan to rewrite this Voce plugin.

szepeviktor commented 7 years ago

@nigrosimone You're right. I've just measured 1 wp_nav_menu() call, and - although Redis is used for object caching - it takes 25 msec!!

szepeviktor commented 7 years ago

You also have a nav menu cache plugin. So you are an expert in this field: https://github.com/szepeviktor/wordpress-plugin-construction/blob/master/tiny-nav-menu-cache.php

nigrosimone commented 7 years ago

@szepeviktor i have tried tiny-nav-menu-cache, it's good for me!