Jeremy Varnham
Forum Replies Created
-
Forum: Plugins
In reply to: [Shortcodes Ultimate - Content Elements] Plugin broke with WP 6.9 updateStill broken
Forum: Plugins
In reply to: [Zotpress] Remove debugging JS data?@sirlouen These appear to be hard-coded at the moment. Perhaps in a future update, the developer will make a toggle-able debug mode.
You could search through the each of the plugin’s js files and comment out every line starting with
console.logbut this would get reverted with any future update.Forum: Plugins
In reply to: [Zotpress] Zotpress 7.4 error in language output@ayliu Here’s a temporary workaround:
In the filelib/shortcode/shortcode.request.phpchange line 955 from:if ( isset($zp_all_the_data[$id]->data->abstractNote) )
$zp_all_the_data[$id]->data->abstractNote = mb_convert_encoding($zp_all_the_data[$id]->data->abstractNote, 'UTF-8', 'UCS-2BE');to:
if ( isset($zp_all_the_data[$id]->data->abstractNote) )
$zp_all_the_data[$id]->data->abstractNote = esc_html($zp_all_the_data[$id]->data->abstractNote);Forum: Plugins
In reply to: [Zotpress] Error on Gutenberg but not DashboardOk, here is what is happening.
I have a single (default) account set up.
The Zotero Gutenberg meta box JS (
zotpress.widget.metabox.js) tries to get theapi_user_idwith this line:jQuery(this).autocomplete( 'option', 'source', zpWidgetMetabox.ajaxurl + "?action=zpWidgetMetabox-submit&api_user_id=" + jQuery("#zp-ZotpressMetaBox-Acccount-Select").val() );But there is no element with the ID
zp-ZotpressMetaBox-Acccount-Select.This should be created by
lib/widget/widget.metabox.php, but as far as I can see, the flow of logic might be slightly faulty: it checks if there is more than one account and within that block it has code for the case where there is only one account, therefore the code for one account will never get called.A partial solution (gets it working):
Line 15 of
lib/widget/widget.metabox.phpchecks if there is more than one account:if ( $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."zotpress;") > 1 )But if we change line 15’s comparator to greater than or equal to:
if ( $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."zotpress;") >= 1 )It will now execute the following code for 1 or more accounts. This seems to me to be the intended logic, since the preceding line has the comment
If there's accounts ….Searching now works.
I’d make a pull request on Github but that version isn’t up-to-date.
Thanks
- This reply was modified 11 months, 1 week ago by Jeremy Varnham.
- This reply was modified 11 months, 1 week ago by Jeremy Varnham.
Forum: Plugins
In reply to: [Zotpress] Error on Gutenberg but not DashboardAh, it turns out that [zotpressInText item=”000″] doesn’t work until [zotpressInTextBib] is added (I notice this is mentioned in the “Help” section, which I had clearly not read carefully).
But the original issue remains.
- This reply was modified 11 months, 1 week ago by Jeremy Varnham.
Forum: Plugins
In reply to: [Zotpress] Error on Gutenberg but not DashboardFurther testing:
This works on the frontend: [zotpressLib userid=”000″].
But [zotpressInText item=”000″] just results in a spinning cog, and no error on console.
The emails that won’t resend:
- always contain a link to a protected file (gives 403 error if unauthenticated)
- always have server response: code 422, cURL error 28 timed out after 5001 ms
Changing the subject line and recipient name/email format didn’t appear to make a difference.
- This reply was modified 1 year, 3 months ago by Jeremy Varnham.
Update: Actually, many emails with links do go through. I’m trying alternative subject lines and recipient names in the
name <email>format.Forum: Plugins
In reply to: [Modern Image Formats] Empty webp versionsGreat! You posted your second reply as I was still writing 🙂
Forum: Plugins
In reply to: [Modern Image Formats] Empty webp versionsDo you know the image-name.png colour type?
identify -verbose image-name.png | grep "Type"If it is PaletteAlpha or Palette, this might be the same problem (webp not supporting palette colour types causing the conversion to fail).
PNG color types:
Grayscale Only shades of gray, no color, no transparency.
TrueColor Full RGB colors, no transparency.
Indexed (Palette) Uses a limited palette of colors (indexed color mode).
GrayscaleAlpha Grayscale with transparency.
TrueColorAlpha Full RGB colors with transparency (RGBA).
PaletteAlpha Indexed (palette-based) colors with transparency.Forum: Plugins
In reply to: [Modern Image Formats] Empty webp versionsI’ve noticed this issue recently on PNG images with transparency that I have shrunk using TinyPNG.com, which seems to convert images colour mode from TrueColorAlpha to PaletteAlpha.
 $ identify -verbose original.png | grep "Type"
Type: TrueColorAlpha $ identify -verbose minified.png | grep "Type"
Type: PaletteAlphaRegenerating the two images
$ sudo -u apacheuser wp media regenerate 32694 32751 --url=example.com
Found 2 images to regenerate.
1/2 Regenerated thumbnails for "minified" (ID 32751).
Warning: imagewebp(): Palette image not supported by webp in /var/www/example.com/wp-includes/class-wp-image-editor.php on line 572
2/2 Regenerated thumbnails for "minified" (ID 32694).
Success: Regenerated 2 of 2 images.The result: original works but minified gives a zero size file.
$ ls -l wp-content/uploads/2025/02/
-rw-r--r-- 1 apacheuser apachegroup 69166 Feb 11 11:19 wp-content/uploads/2025/02/original.png
-rw-r--r-- 1 apacheuser apachegroup 20064 Feb 11 11:20 wp-content/uploads/2025/02/original-png.webp
-rw-r--r-- 1 apacheuser apachegroup 48600 Feb 11 07:56 wp-content/uploads/2025/02/minified.png
-rw-r--r-- 1 apacheuser apachegroup 0 Feb 11 11:20 wp-content/uploads/2025/02/minified-png.webp- This reply was modified 1 year, 3 months ago by Jeremy Varnham. Reason: formatting
I got it working.
Forum: Reviews
In reply to: [PDF Thumbnail Generator] Possible data security issuePerhaps the reviewer @bsoftde would like to explain how WordPress “does the thumbnail generation out of the box”. It certainly doesn’t do so in the same way as this plugin by converting each one and saving it in the same location in the uploads folder. I can only image you are referring to the ability to use a PDF url directly in an img tag to get a preview of the first page? However, this doesn’t give the same flexibility that the plugin affords in terms of image dimensions, format, and quality/compression level. I’m also guessing that older browsers may not support that style of usage either.
- This reply was modified 1 year, 10 months ago by Jeremy Varnham. Reason: typo
Forum: Plugins
In reply to: [PDF Thumbnail Generator] New thumbnails no longer generated automaticallyI can confirm that it is actually a problem with the shared hosting environment. On the sandbox (Ubuntu 22.04, PHP 8.1, Apache/2.4.58 (Ubuntu), ImageMagick 7.1.1-26), once I eventually got everything configured, it works perfectly. Thanks!
Forum: Plugins
In reply to: [PDF Thumbnail Generator] New thumbnails no longer generated automaticallyBear with me – imagemagick is stubbornly not working in the temporary sandbox.