Fix PHP notice related to script registering in Styles settings#3103
Fix PHP notice related to script registering in Styles settings#3103truongwp wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesScript Registration Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | May 26, 2026 6:20p.m. | Review ↗ | |
| JavaScript | May 26, 2026 6:20p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
| } | ||
|
|
||
| FrmStyleComponent::register_assets(); | ||
| FrmFormsController::register_formidable_script(); |
There was a problem hiding this comment.
@truongwp I think we might want to fix this in a different way.
We don't want the front end scripts loading in the styler. Those are off intentionally.
There was a problem hiding this comment.
In FrmProFormsController::admin_footer(), we have a call to enqueue_footer_js(), which enqueues the Pro JS.
There was a problem hiding this comment.
Hm, I think we'll want to fix this in Pro then. It sounds like Pro shouldn't be doing that either.
There was a problem hiding this comment.
Do we need to load the frontend JS on the Styles page?
There was a problem hiding this comment.
@truongwp No, the front end JS is only meant for the front end, and the entry editing page (which uses front end forms).
Pages like the styler, builder, and form settings, should never load the front end JS.
There was a problem hiding this comment.
Ok. I will dequeue the frontend JS on the Styles page.
There was a problem hiding this comment.
I created PR https://github.com/Strategy11/formidable-pro/pull/6487 in Pro to fix this issue. We can close this for now.
|
Thank you @truongwp! |
Fixes https://github.com/Strategy11/formidable-pro/issues/6338
Summary by CodeRabbit