-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not render shortcodes in PUT, POST or DELETE #130
Conversation
@bastienho Can you look at the conflicts in this file? Perhaps rebase so we can move this forward? |
kcristiano@243a11b is rebased against master. The code looks good, you have limited where it is being called and testing it has caused no errors for me. |
@haystack Any objections to the latest PR? I would like to gte this in early in the RC cycle and I believe 5.3-RC is about a week away I have been testing against master and it works well. |
@christianwach Can you add your review on this I have moved this patch to productionon our 5.x sites and have had good results, I'd like to see this in sooner rather than later |
@kcristiano Looks okay to me |
@bastienho Could you squash these commits into a single one please? |
52f14da
to
46d7f7d
Compare
@christianwach done. |
@christianwach @kcristiano shall I merge? |
@eileenmcnaughton yes please and thank you |
Overview
A correction for #129
Do not render shortcodes in REST context for PUT, POST and DELETE methods
Before
REST calls (eg: in gutenberg editor) using PUT, POST or DELETE methods are resulting on an exception.
After
Shortcode is returned unrendered, as it.
Technical details
The exception is provided by CRM_Core_Controller
Comments
WordPress REST API output contain both rendered and raw content, so it seems to be cleaner to render the shortcode.
It would be nicer to update CiviCRM core in order to hook into
CRM_Core_Controller
to let addingpage_arguments[ignoreKey]=true
in request args.Forcing ignoreKey to true correctly renders the shortcode.