Skip to Content Skip to Menu

Community Builder registration loses menu Itemid on submit

  • aalisg
  • aalisg
  • ONLINE
  • Posts: 108
  • Thanks: 8
  • Karma: 0
1 hour 13 minutes ago #344588 by aalisg
Hello,We have identified what appears to be a routing issue with the Community Builder registration form on Joomla 6.We have a published Joomla menu item for CB Registration:
Code:
index.php?option=com_comprofiler&view=registers
French menu item:
  • Title: INSCRIPTION
  • Alias: inscription
  • Itemid: 103
  • Language: fr-FR
  • Published: Yes
The registration page itself works correctly.However, the generated registration form action is:
Code:
/fr/component/comprofiler/saveregisters.html
and contains no
Code:
Itemid
.After successful registration, the user therefore ends up on:
Code:
/fr/component/comprofiler/saveregisters.html
instead of remaining within the registration menu context.This also causes our T4 template to fall back to its home layout (
Code:
layout-home
) on the post-registration page, and the normal Joomla system message is not displayed.We traced the generated form action to:
Code:
components/com_comprofiler/plugin/templates/default/default.php
where it uses:
Code:
$_CB_framework->viewUrl('saveregisters', true, null, 'html', ...)
We then traced
Code:
viewUrl()
to:
Code:
libraries/CBLib/CB/Legacy/CBframework.php
It calls:
Code:
getCBprofileItemid(false, $urlVariables['view'], $additional)
For this request, the view is
Code:
saveregisters
.In
Code:
LegacyFoundationFunctions.php
,
Code:
getCBprofileItemid()
therefore looks for a published Joomla menu item whose link matches:
Code:
index.php?option=com_comprofiler&view=saveregisters
Our Registration menu item naturally uses:
Code:
index.php?option=com_comprofiler&view=registers
There does not appear to be any mapping from the processing view
Code:
saveregisters
back to the registration view
Code:
registers
.Could you please confirm whether this is expected?Should a CB registration form generated from a
Code:
view=registers
menu item preserve that menu Itemid when posting to
Code:
saveregisters
?We would expect the POST processing URL to retain the Registration menu context so that the normal Joomla template layout and system messages remain available.We would prefer not to patch CB core files if there is an existing configuration or supported solution for this.Thank you.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 50727
  • Thanks: 8693
  • Karma: 1475
18 minutes ago #344591 by krileon
This is expected. That's not a valid menu endpoint as it's an internal response page. So it won't have an Itemid. That's generally the purpose of default layout is to handle internal response views like that.

We however have been adding support for creating menu items to internal response pages like that to allow for better customization. Have added a feature ticket to expose more of CBs internal views for Joomla menu creation.

forge.joomlapolis.com/issues/9950

The easiest workaround is to use onAfterSaveUserRegistration in CB Auto Actions and redirect them to your own custom registration complete page. In the future we'll expose a parameter to let you configure this from CB > Configuration > Registration to remove the need for CB Auto Actions here.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beat, nant, krileon
Powered by Kunena Forum