Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W WordPress
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • WordPress
  • Issues
  • #90
Closed
Open
Created Feb 12, 2021 by haystack@haystack🤔Maintainer

Inconsistent Shortcode rendering

The issue is kind of complicated. What happens when a Shortcode is embedded in a Post/Page is that the CiviCRM-WordPress plugin goes into "Shortcode Mode", parses the Shortcode and returns the resulting markup to the page.

However, if any action is taken via a Shortcode, a query string is appended to the URL and CiviCRM-WordPress goes into "Base Page Mode". The relevant code that tries to sort all of this out (and which has been present in the plugin since before I started work on it) is here:

https://github.com/civicrm/civicrm-wordpress/blob/c40aa7106b21ebad25199e8c2b5d5b0e91d351b1/civicrm.php#L693-L732

Now, one of the results of going into "Base Page Mode" is that the entire content of the Post/Page is replaced via a filter on the_content which means - for some layouts and some themes - that the Post/Page is no longer rendered as if the Shortcode were present.

I realise that the current behaviour may now be the "expected" behaviour. Hopefully people can test the PR and let me know what impact (if any) it has for their designs.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking