mathieu
Forum Replies Created
-
Can you tell me in which files / lines, that decision is taken? I’ll quickly find it out. I am running Multisite since before it was even Multisite.
I’ve seen them all.- This reply was modified 2 years, 8 months ago by mathieu.
Fixed it this way…
// Old version 5.4.0$path = str_replace(“/files/files/”, “/files/”, $path);
// New version 5.4.1
if (!strstr($path, “wp-content”)) {
$upload_dir = wp_upload_dir();
$upload_dir[‘basedir’];
return str_replace(ABSPATH, trailingslashit($upload_dir[‘basedir’]), $path);
}
It’s actually worse to be fair…
5.4.1 return path :
/home/xxx/public_html/2023/09/xxxx.jpg
5.4.0 returned :
/home/xxx/public_html/wp-content/blogs.dir/123435/files/files/2023/09/xxxx.jpgIt was at least an easy replace.
I will absolutely test it out… Do you know approximately when it is going out?
I will write myself a calendar note to test it out and come back to you with the results.Thanks
Thanks a lot Pedro.
For those, who wish to add this feature to their own codebase.// Si ShortPixel existe, on va créer une cronjob pour optimiser les images. if (defined("SHORTPIXEL_IMAGE_OPTIMISER_VERSION")) { // Vérifiez si l'événement est déjà planifié if (!wp_next_scheduled('shortpixel/hook/processqueue')) { // Planifiez un événement récurrent pour exécuter l'action ShortPixel wp_schedule_event(time(), 'hourly', 'shortpixel/hook/processqueue'); } }Hi Pedro,
Sadly, I don’t have the dev environnement to test that out right now.
I did fix it myself in the meantime tho.add_filter('shortpixel/filesystem/processFilePath', 'correctSPIOPath', 2, 999); if (!function_exists("correctSPIOPath")) { function correctSPIOPath($path, $original_path) { return str_replace("/files/files/", "/files/", $path); } }Thanks
Hi Pedro,
Thank you very much for your help.
I run php7.3, WordPress 6.2.2 with a Multisite sub-domains install.
Cheers,
Forum: Plugins
In reply to: [Cloudflare] Problem after update to WP 6.1did you find a solution?
Forum: Plugins
In reply to: [Autoptimize] I have no Expires: header on my aggregate filesAh… found it. I introduced it when we fixed the fallback CSS in multisite on your Github (https://github.com/futtta/autoptimize/issues/376).
I ended up using those NGINX rules to bypass the autoptimize_404_handler altogether.
# Gerer les fichiers autoptimize qui existe pu location ~* /wp-content/fichiers/(.*)/js/pq_([a-z0-9]+)\.(js)$ { try_files $uri $uri/ /wp-content/fichiers/$blogid/js/pq_fallback.js; }It also bypasses the php cache handler… So I added “expires max;” and it works.
# Gerer les fichiers autoptimize qui existe pu location ~* /wp-content/fichiers/(.*)/js/pq_([a-z0-9]+)\.(js)$ { try_files $uri $uri/ /wp-content/fichiers/$blogid/js/pq_fallback.js; expires max; }Thanks Frank 😉
Forum: Plugins
In reply to: [Autoptimize] Tons of error in log files even if it does seem to workI think I’ll do that.
Is it stable enough for prod?Also, I have found some other bug in the 404 handler. I have posted it in your github.
I guess it is a better place to post that kind of stuff than here?
Cheers,
Forum: Plugins
In reply to: [Autoptimize] Tons of error in log files even if it does seem to workI have activated it on one of my website and the folder has created itself and there are .css files in it.
It does seems to work. Do you know when it gonna get push into the main tree so that I don’t have to have two plugins (and also re-enabling auto-update).
Cheers & Thank you 🙂
Forum: Plugins
In reply to: [Autoptimize] Tons of error in log files even if it does seem to workHi Frank, thanks for really looking at the issue. Sorry for the delay, I have some family obligations this weekend…
I installed the beta but it’s fatal errorin’g :
`2022/02/12 07:57:34 [error] 29869#29869: *8895501 FastCGI sent in stderr: “PHP message: PHP Parse error: syntax error, unexpected ‘?>’ in /home/xx/public_html/wp-content/plugins/autoptimize-beta/classes/autoptimizeCriticalCSSSettings.php on line 125
As for why the folders get deleted, I agree that it is weird. I am trying to reproduce it. I wonder if it is not a multisite /uploads/ folder thing that auto-delete empty folders.
Thanks.
Forum: Plugins
In reply to: [Autoptimize] Tons of error in log files even if it does seem to workTrue, my autoptimize files are indeed in the AUTOPTIMIZE_CACHE_CHILD_DIR folder and working file but now that I have investigated it a little more It seems like my critical css is just not working.
I went to the critical CSS tabs of your plugin and the folder did suddenly appears and Criticalcss files started to be created but the now the folder has been deleted again and the errors are creeping back in the log files.
It seems like a cache flush delete the «ao_cscss»/site_id/ folders but it’s not creating itselves unless I go to the critical CSS tab.
I think I have been paying the criticalcss.com website for nothing for a good while.
Forum: Plugins
In reply to: [Autoptimize] Disabling the metabox…It’s okay, I fixed it with an update_option in a activation function I have, but the filter doesn’t seem to function properly either way.
Anyway, thanks for your time.
update_option("autoptimize_enable_meta_ao_settings", 0);- This reply was modified 4 years, 8 months ago by mathieu.
Forum: Plugins
In reply to: [Autoptimize] Disabling the metabox…Well, for me, the filter removes the dead last settings from the options page but keeps the metabox.
If I had only one website I wouldn’t care about checking the box, but I am mainly controlling AO with filter and I am trying to keep manual configuration of plugins in general to a minimum.
- This reply was modified 4 years, 8 months ago by mathieu.