Make WordPress Core

Opened 6 weeks ago

Last modified 5 weeks ago

#62778 new defect (bug)

display options for Links/Blogroll in sidebar not saving

Reported by: daveccampbell's profile daveccampbell Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 6.7.1
Component: Widgets Keywords:
Focuses: Cc:

Description

I have several wordpress sites that have been around for a while (like 5+ years).
Very default config, home page is Latest Posts, so I had a Links/Blogroll section in the sidebar.
I recently decided to change the sort order of those Links, and it appears after making a change for the first time, all the default display selections get selected, and making any changes (as in un-selecting) does not 'stick'. It shows but then after a Save, goes back to all selected.
I've gone down many rabbit-holes in troubleshooting, and I'm somewhat of a novice when it comes to WordPress guts, but it seems to work when I turn off the newer Block editors and mess with the widgets in the older interface.

That's kind of all I know.
I'm aware the Links feature was disabled some time ago, but I actually use it critically in my use-case.

Attachments (2)

CleanShot 2025-01-03 at 09.36.47@2x.png (150.4 KB) - added by daveccampbell 6 weeks ago.
screenshot of working and non-working scenarios
CleanShot 2025-01-03 at 09.35.58@2x.png (117.2 KB) - added by daveccampbell 6 weeks ago.
screenshot of working and non-working scenarios

Download all attachments as: .zip

Change History (7)

@daveccampbell
6 weeks ago

screenshot of working and non-working scenarios

@daveccampbell
6 weeks ago

screenshot of working and non-working scenarios

#1 @sainathpoojary
6 weeks ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.26
  • Server: nginx/1.27.3
  • Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty 2.8
  • MU Plugins: None activated
  • Plugins: Link Manager 0.1-beta

Actual Results

✅ Error condition occurs (reproduced).

Additional Notes

In my testing, all combinations caused the checkbox to revert to its default state.

Supplemental Artifacts

Video: https://utfs.io/f/PL8E4NiPUWyOBfIaRfZ01UHRG85yihbLqO4YmEXjegTsuz6x

#2 @abcd95
6 weeks ago

Hey @daveccampbell, Welcome to Trac, and Thanks for bringing this up!

I tried reproducing and I can confirm that the issue exists even after trying all the possibilities of selection -

https://i.postimg.cc/cCLGyTM0/image.png

I believe this behaviour happens due to this piece of code here -

add_filter( 'pre_option_link_manager_enabled', '__return_true', 100 );

#3 @daveccampbell
6 weeks ago

good sleuthing. i am not qualified to go digging into the code besides some basic configuration and plug-ins, so very happy that you were able to uncover that.

i assume a fix will work its way through the normal maintenance channels.

in the meantime, as a workaround, what would you suggest for me on the sites i have with the current code?

simply comment out that line? i am up to that task.

#4 @daveccampbell
5 weeks ago

i commented out that line (it is in there twice) and that made no difference.

can you suggest the proper workaround?

or when that fix get worked on?

thanks.

#5 @sainathpoojary
5 weeks ago

Hey @daveccampbell,

This line enables the Links Manager feature in WordPress, which was deprecated and hidden by default since WordPress 3.5. It ensures that the Links/Blogroll menu item appears in the WordPress admin panel by filtering the link_manager_enabled option to always return true.

Uncommenting it won’t make any difference because its sole purpose is to enable this feature.

   add_filter( 'pre_option_link_manager_enabled', '__return_true', 100 );

Last edited 5 weeks ago by sainathpoojary (previous) (diff)
Note: See TracTickets for help on using tickets.