CiviCRM WordPress shortcode remove the display of default text and instead just return blank if the shortcode cannot be rendered. #262
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
CiviCRM WordPress shortcode remove the display of default text and instead just return blank if the shortcode cannot be rendered.
Before
The message "Do not know how to handle this shortcode" or "The Shortcode could not be handled. It could be malformed or used incorrectly" can be shown publicly on a website (as well as to logged in users) if any of these conditions are true:
After
Shortcode returns blank. No error text is shown.
Technical Details
Comments
It would be preferred that error messages are not shown on the public website and if the CiviCRM shortcode has been mis-configured then this should be picked up by the CiviCRM Admin and/or CiviCRM Developer / Web Developer when testing the page.
It might be beneficial to add throw an exception and log an error when the CiviCRM shortcode returns an empty value. But that's beyond the scope of this PR.
Agileware Ref: CIVICRM-1896