Default Template issue on Joomla 4 Upgrade

6 months 3 weeks ago #335292 by micheleq
Hello,
I have noticed that since upgrading to Joomla 4 the default template for CB non-standard pages changed from being the default Joomla template to being the template for the home page. All pages that have a menu, display the default menu as it should (i.e cb-profile, index.php?option=com_comprofiler&view=userprofile). I have rebuilt the CB menu just in case, but all menus show as intended with all templates set as default. Any menu items on my main menu for CB profile, etc, are set as aliases, for simplicity. All menu items show the correct default template.
However, when there's an action, like upgrading the subscription, then the HOME page template is loaded instead of the Default template. In my Joomla templates section, I have set a temple as default and a different one assigned to the home page. It is the template that's assigned to the home page that loads when using CB with a non-menu assigned plugin function. 
If I force the URL to /component/comprofiler/ (index.php?option=com_comprofiler) it loads the home page template (it defaults to the profile page, as I imagine it should). When going to my profile page (or any other profile) through the set menu, it obviously displays correctly.  It's not a huge deal, because I'm using all the same template positions, it's just that several modules load that get in the way of some tasks like upgrading membership. 
I don't think I changed anything in the upgrade to J4, and it's all looking like it's set properly. In CB Settings, under Profile the template setting is "Default" and there's no other template installed (I had the "Rounded" template, but I uninstalled that a while ago). 

I've looked at all settings I could find, but can't seem to solve the issue. 
Thank you,
Tomás 

Please Log in to join the conversation.

6 months 3 weeks ago #335295 by krileon
Replied by krileon on topic Default Template issue on Joomla 4 Upgrade
Joomla template menu assignment is entirely dependent on Itemid. Turn off Joomla SEO URLs and retry then see what the Itemid is in the URL. You can also create Joomla menu items to CB plugins to allow assignment to CB plugin URLs. Several of CB Paid Subscriptions frontend views for example have menu items available. Simply create a menu item with a menu type of Community Builder > Plugin then select the plugin.


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.
The following user(s) said Thank You: micheleq

Please Log in to join the conversation.

6 months 3 weeks ago #335306 by micheleq
Replied by micheleq on topic Default Template issue on Joomla 4 Upgrade
Hi Kyle,

Joomla template menu assignment is entirely dependent on Itemid. Turn off Joomla SEO URLs and retry then see what the Itemid is in the URL. 
There's no Itemid. The url is /index.php?option=com_comprofiler&view=pluginclass&user=422&plugin=cbpaidsubscriptions 
What I'm doing is going to my profile, selecting the "subscription" tab, choosing a plan to upgrade to and selecting upgrade. This takes me to the page with the basket, which is the url above and has the home page template. 

You can also create Joomla menu items to CB plugins to allow assignment to CB plugin URLs. Several of CB Paid Subscriptions frontend views for example have menu items available. Simply create a menu item with a menu type of Community Builder > Plugin then select the plugin.
I created a menu item for the CB plugin CB Paid Subscriptions and selected a few options (basket, plans, etc.), but still, when going through the process above Profile > Subscriptions > upgrade, I end up with the Home page template, despite the menu. 

For the time being I have re-arranged the modules do that they display after the page content, so that they are not in the way.

Thank you,
Tomás

Please Log in to join the conversation.

6 months 3 weeks ago #335310 by krileon
Replied by krileon on topic Default Template issue on Joomla 4 Upgrade
CBSubs can't typically have an empty Itemid. We always fall back to public profile URL for its Itemid to avoid issues like this. Ensure you've a public and published Joomla menu item to the CB profile page. It doesn't need to be on a menu module, but the menu item should exists.

As for CBSubs specifically you can create Joomla menu items to all of its internal URLs. Create one for each of the options under the "Internal" select group. The page you're specifically going to is probably "Display Basket".


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.
The following user(s) said Thank You: micheleq

Please Log in to join the conversation.

6 months 3 weeks ago #335335 by micheleq
Replied by micheleq on topic Default Template issue on Joomla 4 Upgrade

CBSubs can't typically have an empty Itemid. We always fall back to public profile URL for its Itemid to avoid issues like this. Ensure you've a public and published Joomla menu item to the CB profile page. It doesn't need to be on a menu module, but the menu item should exists.
 
I've always left untouched the Community Builder menu, which includes the profile link (Public ACL) I also had another CB profile menu on my main Joomla menu which was set as ACL registered. I changed that to be a System alias of the CB menu profile to test if that was interfering, but the itemid was still lost (198 in my case) on clicking "upgrade".

As for CBSubs specifically you can create Joomla menu items to all of its internal URLs. Create one for each of the options under the "Internal" select group. The page you're specifically going to is probably "Display Basket".
I had tried and it wasn't working, but I realized the ACL was defaulting to "Guest", when I changed that to Registered, it picked up fine. The idemid on the page URL shows the new menu id (1704) not the Profile itemid (198) when showing the basket. I made menus for all the options (created on a separate 'hidden' menu that has no placement on the site) and I see the itemid changing on every page, as I think it should. Without those menu items the itemid disappears from the URL when upgrading the subscription.
Thank you,
Tomás  
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

6 months 15 hours ago #335669 by micheleq
Replied by micheleq on topic Default Template issue on Joomla 4 Upgrade
While I was able to solve this issue for most of the pages, I still end up with the home template if the itemid goes missing. 
I've seen several pages that don't have an itemid across the site and they all default to the home template.  
This is a Joomla issue as it happens when using Cassiopeia template as well, and across the board, with articles as well. 
I've posted in the Joomla forum as I believe it's a Joomla issue, though there are pages in CB that don't pass the itemid. 
In J3 the template defaults to the proper default template, not the home template. 
Thanks,
Tomás 

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.506 seconds

Facebook Twitter LinkedIn