Dynamic Collection Index/details - Question | JoomShaper

Dynamic Collection Index/details

T

TPMH Tiszaújváros

SP Page Builder 1 month ago

Hello

I ran into a problem while using dynamic collection. I don't know if I'm doing something wrong. I created a collection with 3 fields: text, option, rich text. I uploaded the records, published them, access public. I created a dynamic_index page with 1 field. I created a dynamic_details page with 2 fields.

On the index page, link-->page is the dynamic_details page. On the page, the first record appears on the detailed page, from the second record, an error message randomly appears: At this time, the screen is blank.

Am I doing something wrong? Latest SP version.

BR Csaba

0
18 Answers
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219239

Hello,

Thanks for reaching out to us. Could you please share temporary administrator access to your Joomla backend? You can provide the credentials securely in the hidden content section. Also, please take a full backup of your site before we make any changes.

Once I have access, I’ll investigate further and see what’s causing the issue. Let me know once you’ve shared the details!

Best regards,

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219442

Hi!

Sorry for the late reply.

The site is running on a developer machine, there is no internet access.

I was able to fix the error by deleting the records that were not appearing and then re-uploading them, so the error went away.

Br Csaba

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219449

It’s great to hear that your issue has been resolved. If everything is working fine now, please mark the question as complete by accepting any of our answers.

Thank you!

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219467

Hi!

Unfortunately my joy was premature :) It started randomly again. I will upload it to one of our servers and send you login details soon.

Br Csaba

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219471

Sure.

Thanks

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219497

Hi

I will send you the access.

BR Csaba

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219536

Please, check now. I have linked them with details page.

Thanks

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219544

Hi!

It doesn't work, it just gives a blank page. Try multiple lines.

Br Csaba

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219567

Could you please share an Akeeba ZIP backup file with me?

I will check the issue on my end.

Best regards,

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219584

Hi!

We do not use Akeeba software, but I am attaching the link to the root directory rar file and the sql backup file.

Br Csaba

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219659

Hello,

I tried running your site on my local end, but it seems there are some issues with plugins. Please make sure the following plugins are enabled: https://prnt.sc/1DT31UxoIukp. Also, ensure that the JCE Pro plugins are working correctly.

Thanks.

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219668

Hi

Behaviour - Backward Compatibility 6 - enabled JCE Pro - no problem, latest version. JCE is working fine. The error still exists.

What I found: Warning: foreach() argument must be of type array|object, null given in E:\www\developer\administrator\components\com_sppagebuilder\dynamic-content\Site\PageSeoSettings.php on line 213

This warning only appears on a blank page, in the event of an error.

Br Csaba

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219671

Hi for example:

$data = (new CollectionDataService())->fetchCollectionItemById($itemId);

administrator\components\com_sppagebuilder\dynamic-content\Site\PageSeoSettings.php line 209: ItemId on-screen: 2950 In databes: 40

Database max iteimd number: 138 :) Br Csaba

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219673

But on my end, I can not restore this.

Thanks

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219675

Hi!

For some reason the following:

$input = Factory::getApplication()->input;

does not contain the itemid correctly:

[Itemid] => 147 [collection_item_id] => Array ( [0] => 2950 )

Br Csaba

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219677

Hi Csaba,

Thank you for checking this.

It seems that the request is passing collection_item_id = 2950, but this ID does not exist in the database (the maximum item ID is 138). Because of this, the function fetchCollectionItemById($itemId) returns null, which then triggers the foreach() warning in PageSeoSettings.php.

Most likely this is happening due to an invalid or outdated collection_item_id parameter being passed in the request. Could you please check if any page, dynamic content, or menu item is referencing collection item 2950?

You may also want to clear the Joomla cache and verify the SP Page Builder collection settings.

Please let me know if you find where this ID is coming from.

Thanks.

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 month ago #219753

It’s great to hear that your issue has been resolved. If everything is working fine now, please mark the question as complete by accepting any of our answers.

Thank you!

0
T
TPMH Tiszaújváros
Accepted Answer
1 month ago #219681

I found it!

Originally, the data stored in DC was in separate Joomla articles, whose categories had menu items assigned to them. I deleted the old articles, categories and their menu items and the error disappeared.

Thanks for your help! BR Csaba

0