Skip to Content Skip to Menu

Updated: CB Gallery plugin results in error when viewing SOME user profiles

  • boyjahq
  • boyjahq
  • ONLINE
  • Posts: 479
  • Thanks: 33
  • Karma: 3
1 week 1 day ago - 1 week 1 day ago #342393 by boyjahq
After recent updates, we get the following error when a user clicks the link to view another user's profile:

CB\Plugin\Gallery\Controller\ItemsController::getItems(): Argument #3 ($folder) must be of type ?int, string given, called in /home/wwoofjap/www/www/home/components/com_comprofiler/plugin/user/plug_cbgallery/library/Controller/ItemsController.php on line 656

It only happens when clicking the link for some of our users. Most of the time the link opens up the user profile. I can't find anything particularly unique or unusual about the profiles that will not open.

Gallery plugin 3.0.0+build.2025.11.10.14.14.55.ea1a80da2
Joomla 4.4.14
PHP 8.2
MySQL 8.4.3-3

Digging around in the databases, I found that the profile links that generated the error did not have the correct gallery_id assigned in comprofiler_plugin_gallery_items. I can't say if the recent update for some reason changed the gallery_id for those users, or if the gallery_id that they had in the database worked before but doesn't work now. I manually changed all incorrect gallery_id numbers to the correct one and, so far, I am unable to generate the error reported above. It will take us a while to check all 22539 user profiles on our site.
Last edit: 1 week 1 day ago by boyjahq.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49757
  • Thanks: 8507
  • Karma: 1465
1 week 1 day ago - 1 week 1 day ago #342394 by krileon
You may have some orphaned media. The migration can't guarantee it's able to find a gallery for every media. So you may need to correct any orphaned media. The easiest way to do that is navigate to CB Gallery > Media then click Search Tools and for the - Select Gallery - filter select Orphaned. This will display all media without a gallery id. Please keep in mind CB Gallery 3.0 is a migration not a simple update as it is a major release with a complete rewrite.

Regardless will look into that error as it certainly shouldn't be trying to pass around an invalid type.


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.
Last edit: 1 week 1 day ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49757
  • Thanks: 8507
  • Karma: 1465
1 week 1 day ago #342395 by krileon
Ok, there was confirmed a bug on that line. I've now released a build release with it fixed.

Also what asset does your orphaned media have? Migration should've had no issues migrating all profile media. So that maybe media with an asset that I had not accounted for or of which a gallery couldn't be determined.


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.

  • boyjahq
  • boyjahq
  • ONLINE
  • Posts: 479
  • Thanks: 33
  • Karma: 3
4 days 19 hours ago - 3 days 20 hours ago #342412 by boyjahq
Search did not show any orphaned images. When I checked the comprofiler_plugin_gallery_items database, all photos that were not working had gallery_id value of 1. When I changed all of them to the correct gallery_id value of 108, it fixed the problem.

Now there is another problem. Photo Gallery gallery page has no photos and the module that used to show a random photo from the gallery has disappeared from the front end. I notice that some of the gallery assets have %. marks. For example, the asset for the single photo module shows %.%.field.107 as the asset. Are the %. marks causing the problem?

The asset for field 107 is profile.[user_id].field.107

I'M GETTING IT FIGURED OUT. It seems that the introduction of Galleries may be causing some of the problems. I'm going through and recreating the parts that are broken and finding lots of settings that we did not have before.
Last edit: 3 days 20 hours ago by boyjahq.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49757
  • Thanks: 8507
  • Karma: 1465
2 days 6 hours ago #342418 by krileon

Are the %. marks causing the problem?

Yes, that's not really a valid asset. Below is a valid fields wildcard asset.

profile.%.field.%

I'M GETTING IT FIGURED OUT. It seems that the introduction of Galleries may be causing some of the problems. I'm going through and recreating the parts that are broken and finding lots of settings that we did not have before.

Unfortunately I cannot guarantee every use case will migrate. I've tried my best to ensure migration went as smooth as possible, but everyone needs to review their configurations carefully. This is not an upgrade, but a migration as the gallery behavior has been entirely rewritten. There are a lot of new exciting features to work with now. Galleries work like Streams in CB Activity where their storage asset and their display asset can be entirely different now so there's a lot more control.


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: beatnantkrileon
Powered by Kunena Forum