nbi1
Forum Replies Created
-
Thanks, I’ll check that out.
How do I check the plugin version in a scenario like this where the installer hasn’t completed yet? Can’t go to the WP dashboard because installation hasn’t finished. wp-cli can’t help because the dashboard isn’t available. Is your plugin version a string in one of the files?
As an experiment I commented out line 60. Line 85 also required ‘GLOBAL’. With these 2 changes the installer completed successfully. Hopefully the installation isn’t hosed, at least according to the installer there were no problems (with these fixes in place).
Your workaround solves the problem, thank you. Now I’ve got other issues to deal with, but at least the collation check isn’t derailing the process.
Thanks, that’s what I was looking for. I’ll give that a try. I opened a ticket just to make sure this issue gets tracked. I think the fixes I proposed will work just fine – I assumed it’s just a matter of constructing a correct collation list when the archive is built and your suggested workaround indicates that this is the case.
- This reply was modified 4 years, 2 months ago by nbi1.
Figured it out. My instincts about an incorrect check were on target – the installer is indeed performing an invalid check.
During the backup of the original you execute the above query to get the list of collations. That’s fine. But when you store the list in the installer you store utf8_general_ci when in fact utf8_general_ci does not appear in the query result! Why? Because you find utf8mb3_general_ci which is an alias for utf8_general_ci and you unalias before storing the list. So at the restore end of the operation the installer consults the list which includes utf8_general_ci and the validation fails because it’s not found in the server collation list. But it is there – as the alias utf8mb3_general_ci ! Actually the installer hints at this problem with its output – it should not be showing utf8_general_ci it should show utf8mb3_general_ci because the aliased form is used in newer versions of MariaDB (I didn’t know that until I researched this issue).
So the fix consists of 2 checks when backing up:
1. If the collation query returns utf8mb3_general_ci store that – do not store the unaliased utf8_general_ci.
2. If the collation query returns utf8_general_ci (old MariaDB) store the alias utf8mb3_general_ci instead.These checks will ensure that with a newer (older doesn’t make sense) MariaDB the installer will properly try to match utf8mb3_general_ci in its list against utf8mb3_general_ci in the server collation list.
This fix will solve the problem for anyone going through the backup/restore cycle for the first time. It won’t help those like me who already have an installer backup set with utf8_general_ci instead of utf8mb3_general_ci. Couple of possible solutions for that: 1. a standalone tool/script that fixes the installer’s collation list, or 2. add installer option to handle this case (can’t just omit this validation because if utf8mb3_general_ci is missing from the server then there is a real problem). Manually hacking the installer list would probably work if I knew where it was buried, but I’m sure you don’t want the headaches resulting from asking users to do this.
Sorry, didn’t see your response when I posted – disregard my last post. Based on your response I have a theory on what might be going on, but I’ll need to do some testing to confirm.
My guess is that the bug consists of just looking for ‘utf8’ to infer which collations are needed. This wouldn’t be a problem with older versions of MariaDB (pre 10.6.4 ?) because these older server versions still included utf8/utf8_general_ci. So even if utf8 is erroneously flagged as needed it’ll still get past the installer because the server supports it. But the newer versions (10.6.4+) do not so the bug is exposed. Googling shows numerous reports about the MariaDB utf8 problem, this is typical: https://www.mail-archive.com/misc@openbsd.org/msg179329.html. If my guess is correct the fix should be simple – don’t look for ‘utf8’, look for ‘utf8mb4’.
The plugin might be 8.1 compatible, but installer.php is not.
/var/log/apache2/error.log:
[Mon Feb 28 00:04:57.016844 2022] [php:error] [pid 24518] [client 192.168.1.5:50674] PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /var/www/html/installer.php on line 632I had backed up my WP installation over a year ago and only recently attempted a restore when I encountered this. This and other problems surfaced in a number of plugins that weren’t updated for php8.1.
WPematico supposedly can find images in source articles and set them to be the featured image, but that isn’t working. I just found one of your tutorials on featured image which seems to contain code for extracting the first found article image as the featured. I’ll give that a try.
Regarding the display of the image I may have misunderstood something in the docs. I took image_size=”thumbnail” to mean scale & display the featured image. It seemed to me that the presence of “image_size” would make include_image=”true” unnecessary since one wouldn’t use “image_size” unless the intent was to display the image. But based on your comment both are necessary if one wants to display a thumbnail?
I’m using WPematico for feed aggregation. You are correct, a unique category for each source is a good solution. Another possibility is creating a unique campaign for each source.
The next 2 issues to grapple with are the publication dates of the articles in the posts (for which I can’t find a parameter) and setting an article image to be the featured image.
I’ll probably need to create a custom template as well, but I found a straightforward recipe for doing that so that won’t be an impediment. Regarding the publication date maybe I missed something while looking at the parameter listing. It just seems like that would be a commonly used data item to be displayed.
Many thanks.
Forum: Plugins
In reply to: [WPeMatico RSS Feed Fetcher] set featured image not workingI aggregate multiple feeds and I checked the page source of the feed items – they definitely contain images (
). Yes, I had already looked at that article and used the recommended global settings.
Thanks – greatly appreciated.
The CSS works ok – the problem was that I didn’t set the featured image. Duh.
There are however annoyingly large gaps between adjacent columns of the grid that I can’t seem to shrink even with your suggested CSS. This may be a problem with the formatting of the posts themselves though.
Sigh – I’m such an idiot. I forgot about the warnings involving the “featured image”. It’s easy to forget about that because if the post contains an embedded image it will display correctly via the single template. But as far as post grids go the “featured image” is *required*. I need to get into the habit of always setting the “featured image” even if it duplicates the embedded image. Since grids seem to require this I’m not sure why the default simply doesn’t set the “featured image” using the first embedded image.
Similar problem, but I can’t get your CSS to work. What structure does navigator show for the parent elements of your short code?