adrianww
Forum Replies Created
-
Thank you very much for that – there’s useful additional info in there. I’m less concerned about it now that I know the nature of the bug.
Hi again,
It’s OK for now as I’ve got everything up to date. I had the option to change some settings so that the PHP process timeout no longer interrupted the installs or updates. I’m pretty sure that caching wasn’t causing the problem and it was purely the length of time it was taking the repository to deliver the update that caused things to break. Not sure why it was taking so long – could be some routing snafu between ww.wp.xz.cn and the host server or who knows what.
In any case, if I run into it again, I know what it is and can work around it. If I do start seeing it regularly, I’ll investigate further on the network/connectivity side I think.
Thanks!
OK, so having had the pleasure (!!) of trying to track down this problem for the last couple of days, I now have a better picture.
The reason that the install or update from the WordPress repository was failing was that the installation/update process on the affected sites was taking so long that it was hitting a PHP spawned process timeout while running. Why the install or update now seems to be so slow I don’t know – I’ve installed Matomo several times on various sites and it has been updating with no problems. It only seems to be since the last update that the installation/update process has become so slow that it runs up against process time limits.
(As an aside, something similar seems to be happening with the most recent update to Woocommerce too. Again, multiple sites on different hosting providers.)
Anyway, I don’t know whether it’s something in the install package itself or something in the way in which the WordPress repository is delivering it to the target sites. But, whichever it is, it means that installations or updates from the repository fail, while installations directly from an uploaded .zip file don’t.
Given that a .zip file which is downloaded manually from ww.wp.xz.cn then uploaded to the sites works fine, but the install/update from the WordPress repository runs so slowly as to cause these issues, is it possible that there is some kind of problem with the way in which the repository is delivering the plugin to the sites?
Well…funnily enough…
Just tried reinstalling Matomo on the other dev environment I’m working with and it failed again. This was trying to install Matomo via the WordPress repository again (selecting Install Now from the list when you do Add New plugin in the WordPress admin panel). The install button in the UI changed to “Update Failed” and I got the same error message as above (500 Internal Server Error for the install, although the site and admin dashboard are both still up and responding). The server error logs show:
[Wed Mar 01 04:16:07.559724 2023] [fcgid:warn] [pid 149450:tid 118689398527744] [client 146.90.240.164:61885] mod_fcgid: read data timeout in 120 seconds, referer: https://www.dev-ruthclayton.glendrian.com/wp-admin/plugin-install.php?s=matomo&tab=search&type=term [Wed Mar 01 04:16:07.559901 2023] [core:error] [pid 149450:tid 118689398527744] [client 146.90.240.164:61885] End of script output before headers: admin-ajax.php, referer: https://www.dev-ruthclayton.glendrian.com/wp-admin/plugin-install.php?s=matomo&tab=search&type=termOnce again, installing from the .zip file seems to work – it’s running installs or updates from the WordPress repository that seems to fail.
If it was just the installations on the dev sites failing, I’d have said that it looks like an issue with the connection between the dev host and the WordPress repository, but it also happened when trying to update the existing Matomo installation on the live site, which is hosted with a different company altogether. Dev sites are with Dreamhost in the US, live site is with Fasthosts in the UK.
Any suggestions?
OK, been doing some more testing here.
The failed installations/updates seemed to be if using the WordPress repository. If I download the .zip file from Matomo and install the plugin that way, everything seems to work.
Having done that, I then uninstalled Matomo and reinstalled from the WP repository and this now worked as well.
Whether there was something funny going on with the connection between my sites and the repository or whether I was getting some kind of corrupted version of what was in the repository I don’t know but, hopefully, things seem to have resolved themselves.
I’ll leave this open for another 24-48 hours in case the issue reappears but if everything seems to be back on the level, I’ll mark it as resolved.
Maybe it’s just been one of those days…
Forum: Plugins
In reply to: [Recencio Book Reviews] Plugin not picking up screenshot for custom templateHi Kemory
No problem, you’re welcome. Thank you for coming up with this plugin, it’s great.
I spent a few minutes searching all the plugin sources for get_template_directory_uri() and that was the only place I found it, so displaying the template screenshot might be the only thing that is really affected by it. It certainly seemed to be the only thing as, apart from the image in the admin panel, our template seemed to get picked up and work perfectly fine.
All the best
Adrian.
Forum: Plugins
In reply to: [Recencio Book Reviews] Plugin not picking up screenshot for custom templateHi again,
Just thought I’d take a look at the code and see if I could spot where this is happening.
I think the culprit is around line 45 in the add_layout_to_list() function in class_rcno_reviews_get_templates.php in the admin/settings directory. When handling a local layout file, it uses:
$base_url = get_template_directory_uri() . '/rcno_templates/' . $file;to set the base URL. This will end up generating a URL for an /rcno_templates/file in the parent/root theme directory. This works fine if there isn’t a child theme, but doesn’t work if a child theme is being used.
To test this out, I replaced the above line with:
$base_url = get_theme_file_uri('/rcno_templates/' . $file);in the plugin installation on the site that we’re working on and it then picks up the file correctly even with a child theme installed and shows our screenshot.png in the Reviews->Settings->Templates panel.
Thanks again,
Adrian