WPIntell

Source evidence

Plugin has broken in WP WordPress 6.6.1

Links shortcode · support · 2024-07-29T17:44:00+00:00

complaintsentiment
highseverity
0.96relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 22 rows with source links

9.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

20 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
maiden_taiwan unresolved
This plugin has broken on upgrade to WordPress 6.6.1. In a list of links, only the first link shows up. It works in WP 6.5.5. Here is an example of a shortcode with the buggy behavior: [links category_name="Articles" class="articles" links_per_page="75" links_list_id="articles_id"] I found the problem. WordPress 6.6.1 changed one test in the core file wp-includes/bookmark.php , line 310, to be stricter: OLD: if ( -1 != $parsed_args['limit'] ) { NEW: if ( -1 !== $parsed_args['limit'] ) { The problem is that Links Shortcode passes in the value "-1" which fails the stricter test against the integer -1 . The result is that the string LIMIT 1 is appended to the SQL query, cutting off the list of bookmarks after one value. I don’t know if this is a WordPress bug or a plugin bug, but here’s a fix. Modify links-shortcode.php function linkssc_shortcode at line 122: OLD: 'limit' => get_option('linkssc_howmany', '-1'), NEW: 'limit' => (int)get_option('linkssc_howmany', '-1'), THANK YOU! You’ve saved me a lot of time! @maiden_taiwan : Many thanks for this solution which works perfectly!

Comments

3 shown
maiden_taiwan 2024-07-29T21:41:00+00:00

I found the problem. WordPress 6.6.1 changed one test in the core file wp-includes/bookmark.php , line 310, to be stricter: OLD: if ( -1 != $parsed_args['limit'] ) { NEW: if ( -1 !== $parsed_args['limit'] ) { The problem is that Links Shortcode passes in the value "-1" which fails the stricter test against the integer -1 . The result is that the string LIMIT 1 is appended to the SQL query, cutting off the list of bookmarks after one value. I don’t know if this is a WordPress bug or a plugin bug, but here’s a fix. Modify links-shortcode.php function linkssc_shortcode at line 122: OLD: 'limit' => get_option('linkssc_howmany', '-1'), NEW: 'limit' => (int)get_option('linkssc_howmany', '-1'),

WebSmithery 2024-11-04T20:03:00+00:00

THANK YOU! You’ve saved me a lot of time!

flobogo 2025-03-04T22:00:00+00:00

@maiden_taiwan : Many thanks for this solution which works perfectly!