Skip to content

Fix delete / remove or add autoload for options which have dot in their name#42

Merged
aristath merged 2 commits intodevelopfrom
filip/fix-options-with-dots
Jul 7, 2025
Merged

Fix delete / remove or add autoload for options which have dot in their name#42
aristath merged 2 commits intodevelopfrom
filip/fix-options-with-dots

Conversation

@ilicfilip
Copy link
Copy Markdown
Collaborator

@ilicfilip ilicfilip commented Jul 5, 2025

Came in https://wordpress.org/support/topic/litespeed-autoload/

The issue is comes from LiteSpeed options having dot in their name, for example litespeed.admin_display.messages and it is partly valid.

AAAOO plugin option name to generate the ID of the row (HTML element) for that option in the table, but this is invalid CSS ID selector: tr#option_litespeed.admin_display.messages

So what happens is that option is deleted, but the element can not be found in the table which triggers a JS error that user shared.

Also, looks like LiteSpeed options are recreated on page load so once user refreshes the page option is again displayed and looks like nothing happened.

This PR replaces the dots with _ (maybe we can use different character for replacement, just needs to make valid CSS selector?) and fixes the issue. Manipulation is done only in JS, doesn't need to be adjusted.

@ilicfilip ilicfilip requested a review from aristath July 5, 2025 05:31
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 5, 2025

Test on Playground
Test this pull request on the Playground

@aristath aristath merged commit 5b1aa78 into develop Jul 7, 2025
7 checks passed
@ilicfilip ilicfilip deleted the filip/fix-options-with-dots branch July 17, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants