Skip to content

fix: tags suggestions are not loading#1851

Open
sapayth wants to merge 1 commit into
weDevsOfficial:developfrom
sapayth:fix/tags_suggestions_are_not_loading_for_form_builder
Open

fix: tags suggestions are not loading#1851
sapayth wants to merge 1 commit into
weDevsOfficial:developfrom
sapayth:fix/tags_suggestions_are_not_loading_for_form_builder

Conversation

@sapayth
Copy link
Copy Markdown
Contributor

@sapayth sapayth commented Apr 27, 2026

closes #823

Summary

Fixes the Tags field on frontend forms where the autocomplete suggestion dropdown stopped working — every keystroke returned a "Permission denied" error instead of matching tags. With this fix, users can again type into a Tags field and see live suggestions as expected.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved data serialization in the tag autocomplete feature to ensure consistent and reliable query handling.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eeb9cbd2-63f2-4c81-8a76-879de4b21b30

📥 Commits

Reviewing files that changed from the base of the PR and between 3252a39 and b826653.

📒 Files selected for processing (1)
  • includes/Fields/Form_Field_Post_Tags.php

Walkthrough

Updates the JavaScript initialization for tag autocomplete functionality to use wp_json_encode() for query string serialization instead of esc_js() within quoted JS string literals.

Changes

Cohort / File(s) Summary
Tag Field JS Encoding
includes/Fields/Form_Field_Post_Tags.php
Modified query string serialization approach for tag suggestion feature initialization, switching from inline escaping to JSON encoding.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

A single line hops into place,
JSON encoding wins the race,
Tag suggestions now more sound,
Better escaping all around! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR aims to fix tag suggestions, but linked issue #823 is about Email Address field mapping in the Edit Profile form—a completely different feature with no relationship to the tag autocomplete functionality. Verify that the PR is linked to the correct issue. If this PR fixes tag suggestions (#1851), it should reference the appropriate tags-related issue, not issue #823 about email field mapping.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix: tags suggestions are not loading' accurately describes the main change, which fixes a JavaScript serialization issue in the tag autocomplete feature.
Out of Scope Changes check ✅ Passed The code changes are narrowly scoped to fixing JavaScript serialization in tag suggestions (wpuf_frontend.ajaxurl + query_string handling), which aligns with the PR's stated objective of restoring tag autocomplete functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant