WordPress: Rendering formbuilder/afform shortcode doesn't work when in "Remain in shortcode mode"
- Create a search/formbuilder (eg. a directory of contacts).
- Add that to a new WordPress page via shortcode eg.
[civicrm component="afform" name="afsearchMembershipDirectory"]
- Open that page with Shortcode display mode = "Legacy Base Page Mode" and see that it renders correctly.
- Open that page with Shortcode display mode = "Remain in Shortcode Mode" and see that you have a console syntax error
Uncaught SyntaxError: Unexpected token '<'
when loadinghttps://example.org/membership-directory/?civiwp=CiviCRM&q=civicrm%2Fasset%2Fbuilder&an=crm-l10n.js&ad=...
Checking the result of that call shows it loaded a WordPress html page instead of the javascript file in step 4.