I cannot reproduce the error, when I remove the hijack option the content still displays. I am on a clean environment when I test, but the hijack option is working on all our sites. I agree as the check is
If it's not set the content should not be hijacked.
I did try with the Block Editor, but for all our sites that use Shortcodes we create that content using Classic editor. But there should be no difference.
So I did some more testing. Hijack does work, but only if the user isn't registered yet. Hijack=1 will hide the other content when I view it in a private window, but has no impact on what I see when logged in.
CoreyBurgerchanged title from Registering for event hides Wordpress post content to Hijack=0 ignored once registered for event
changed title from Registering for event hides Wordpress post content to Hijack=0 ignored once registered for event
@CoreyBurger@kcristiano Yes, this is exactly what's responsible. As soon as the page=CiviCRM query var is present in the URL, then the page/post is handled as if it were the basepage and hijack is therefore in operation. This doesn't occur when using the shortcode with action="info" since no redirect occurs in that case.
Given that the redirect takes place during the CiviCRM invoke process and given that CiviCRM relies on the path to build the form (the redirect takes place during the preProcess phase of building the "Registration" form) I'm not clear how CiviCRM would serve up the "Event Info" page without the redirect. That's a direct result of CiviCRM's "one operation per HTTP request" inflexibility, I'm afraid
There are number of possible options at this stage:
Use action="info" and not action="register" in the shortcode.
Combine the information from the WordPress post into the CiviCRM Event so it's always present.
Find some complicated way to prevent the redirect given the particular circumstances.
That's a bit frustrating, but glad I understand how it is happening. Is this something that will be fixed with afform? I use Caldera Forms for my volunteer pages and will be rolling it out for membership, but those are largely static pages, whereas we have continual events and manually editing the form is a headache.
Sorry, we use Caldera Forms and it's linkages to CiviCRM for contact forms and CTAs but they are largely unchanged. A Caldera Form for an event would require editing them for each event
Thank you for raising an issue to help improve CiviCRM. As you may know, this issue has not had any activity for quite some time, so we have closed it.
We would like you to help us to determine if this issue should be re-opened:
If this issue was reporting a bug, can you attempt to reproduce it on a latest version of CiviCRM?
If this issue was proposing a new feature, can you verify if the feature proposal is still relevant? Did it get the concept-approved label? Have other people also shown interest? Could it be implemented as an extension?
If the answer to either question is yes, please feel free to comment or re-open the issue. Please also consider:
Is it something that you could help implement, either by sending a patch or hiring someone who can?
Thank you for your help and contributions to CiviCRM.
P.S. This is an automated message, see infra/gitlab issue 20. We understand that automatic responses are annoying, but given the number of open issues as the project evolves, we need a bit of help to triage and prioritise the most relevant issues.