By EDV Support on Thursday, 02 June 2022
Posted in Technical Issues
Likes 0
Views 383
Votes 0
Dear support,

we have a problem when creating repeated events in the frontend. After saving we always get the error. "0 Attempt to assign property "postdata" on bool". The first event will be saved and if you edit it you will see that recurrences are set up. However, the repetitions are not saved as separate events.

There is no problem to save events without repeating and there is also no problem to save events with repeating events in the backend.

Unfortunately, this is an inaccessible intranet site. We could not reproduce the issue on a public test page. So it doesn't seem to be a fundamental error.

Do you perhaps still have an idea what this error message could mean and how we can fix the error?

Thank you and best regards
I can't replicate this issue locally as well.

But can you provide us with the following details so we can try reproduce this issue again?

1. What is your current Joomla version?

2. What is your current Easysocial version?

3. Is this only happen when you create a recurring event on the frontend? How about the backend?

4. What is your current PHP version?

After saving we always get the error. "0 Attempt to assign property "postdata" on bool".

Can you try temporary switch your site template to the default Joomla protostar template then enable the debug mode from the backend > System > global configuration > system.

After that, try to create a recurring event on the frontend again and see if it can show a full error backtrace? If yes, can you provide us with this screenshot?
·
Thursday, 02 June 2022 12:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex, thank you for your fast answer.

1. Joomla: 4.1.4
2. EasySocial: 4.0.9
3. Works in Backend
4. PHP Version: 8.1.3

switched to cassiopeia instead protostar. Is this the screenshot, you expected?

This is from Log at bottom of page:

error - Uncaught Throwable of type Error thrown with message "Attempt to assign property "postdata" on bool". Stack trace: #0 [ROOT]/libraries/src/MVC/Controller/BaseController.php(735): EasySocialControllerEvents->saveStep() #1 [ROOT]/components/com_easysocial/controllers/controller.php(63): Joomla\CMS\MVC\Controller\BaseController->execute('savestep') #2 [ROOT]/components/com_easysocial/easysocial.php(100): EasySocialController->execute('saveStep') #3 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(69): require_once('/data/web/1/000...') #4 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/data/web/1/000...') #5 [ROOT]/libraries/src/Component/ComponentHelper.php(389): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #6 [ROOT]/libraries/src/Application/SiteApplication.php(204): Joomla\CMS\Component\ComponentHelper::renderComponent('com_easysocial') #7 [ROOT]/libraries/src/Application/SiteApplication.php(243): Joomla\CMS\Application\SiteApplication->dispatch() #8 [ROOT]/libraries/src/Application/CMSApplication.php(278): Joomla\CMS\Application\SiteApplication->doExecute() #9 [ROOT]/includes/app.php(63): Joomla\CMS\Application\CMSApplication->execute() #10 [ROOT]/index.php(32): require_once('/data/web/1/000...') #11 {main}

Thank you and best regards
·
Thursday, 02 June 2022 17:20
·
0 Likes
·
0 Votes
·
0 Comments
·
1. Joomla: 4.1.4
2. EasySocial: 4.0.9
3. Works in Backend
4. PHP Version: 8.1.3

switched to Cassiopeia instead protostar. Is this the screenshot, you expected?

Yes, since your site uses Joomla 4, this Cassiopeia template will be the Joomla default template.

We did try this locally and follow your requirement, but we still can't manage to replicate the issue.

Can you do me a favor to put the following debug code into your site under this file?

JoomlaFolder/components/com_easysocial/controllers/events.php

You can check my attached screenshot below and see which line of code you should add to this.


var_dump($data);
var_dump("=====================");
var_dump($eventParams);
var_dump("=====================");
var_dump($stepSession->values);
var_dump("=====================");
var_dump(ES::makeObject($stepSession->values));exit;


After that, you have to try to create a recurring event on the frontend, once the page shows the result, you have to view the page source then copy the result and send it to us. (you can save it into one of the text files before you send)

Once you have done, you have to remove the debug code and save the file again.

Remember to do the full backup before you make any changes.
·
Friday, 03 June 2022 11:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex, thank you for your help. This is the output:


array(20) { ["cid"]=> string(76) "["38","39","40","41","42","43","44","45","46","47","59","60","61","62","63"]" ["es-fields-39"]=> string(5) "ccccc" ["es-fields-40"]=> string(5) "ccccc" ["startDatetime"]=> string(19) "2022-06-04 14:36:00" ["endDatetime"]=> string(19) "2022-06-05 14:36:00" ["event_allday"]=> string(1) "0" ["es-fields-43"]=> string(58) "{"type":"daily","daily":["6"],"end":"2022-07-09 00:00:00"}" ["es-fields-44"]=> string(0) "" ["event_type"]=> string(1) "1" ["es-fields-46"]=> string(0) "" ["es-fields-60"]=> string(114) "{"address1":"","address2":"","city":"","state":"","zip":"","country":"","latitude":"","longitude":"","address":""}" ["es-fields-62"]=> string(112) "{"source":"","path":"","data":"{\"top\":null,\"left\":null,\"width\":null,\"height\":null}","type":"","name":""}" ["es-fields-63"]=> string(25) "{"data":"","position":""}" ["conditionalRequired"]=> string(0) "" ["currentStep"]=> string(1) "1" ["task"]=> string(8) "saveStep" ["boxchecked"]=> string(1) "0" ["option"]=> string(14) "com_easysocial" ["controller"]=> string(6) "events" ["hasRecurringFieldData"]=> bool(true) } string(21) "=====================" bool(false) string(21) "=====================" string(936) "{"cid":"[\"38\",\"39\",\"40\",\"41\",\"42\",\"43\",\"44\",\"45\",\"46\",\"47\",\"59\",\"60\",\"61\",\"62\",\"63\"]","es-fields-39":"ccccc","es-fields-40":"ccccc","startDatetime":"2022-06-04 14:36:00","endDatetime":"2022-06-05 14:36:00","event_allday":"0","es-fields-43":"{\"type\":\"daily\",\"daily\":[\"6\"],\"end\":\"2022-07-09 00:00:00\"}","es-fields-44":"","event_type":"1","es-fields-46":"","es-fields-60":"{\"address1\":\"\",\"address2\":\"\",\"city\":\"\",\"state\":\"\",\"zip\":\"\",\"country\":\"\",\"latitude\":\"\",\"longitude\":\"\",\"address\":\"\"}","es-fields-62":"{\"source\":\"\",\"path\":\"\",\"data\":\"{\\\"top\\\":null,\\\"left\\\":null,\\\"width\\\":null,\\\"height\\\":null}\",\"type\":\"\",\"name\":\"\"}","es-fields-63":"{\"data\":\"\",\"position\":\"\"}","conditionalRequired":"","currentStep":"1","task":"saveStep","boxchecked":"0","option":"com_easysocial","controller":"events","hasRecurringFieldData":true}" string(21) "=====================" object(stdClass)#3282 (20) { ["cid"]=> string(76) "["38","39","40","41","42","43","44","45","46","47","59","60","61","62","63"]" ["es-fields-39"]=> string(5) "ccccc" ["es-fields-40"]=> string(5) "ccccc" ["startDatetime"]=> string(19) "2022-06-04 14:36:00" ["endDatetime"]=> string(19) "2022-06-05 14:36:00" ["event_allday"]=> string(1) "0" ["es-fields-43"]=> string(58) "{"type":"daily","daily":["6"],"end":"2022-07-09 00:00:00"}" ["es-fields-44"]=> string(0) "" ["event_type"]=> string(1) "1" ["es-fields-46"]=> string(0) "" ["es-fields-60"]=> string(114) "{"address1":"","address2":"","city":"","state":"","zip":"","country":"","latitude":"","longitude":"","address":""}" ["es-fields-62"]=> string(112) "{"source":"","path":"","data":"{\"top\":null,\"left\":null,\"width\":null,\"height\":null}","type":"","name":""}" ["es-fields-63"]=> string(25) "{"data":"","position":""}" ["conditionalRequired"]=> string(0) "" ["currentStep"]=> string(1) "1" ["task"]=> string(8) "saveStep" ["boxchecked"]=> string(1) "0" ["option"]=> string(14) "com_easysocial" ["controller"]=> string(6) "events" ["hasRecurringFieldData"]=> bool(true) }
·
Saturday, 04 June 2022 21:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex,

i applied the code to my testsite too and compared the two dumps. I did not understand anything, but inspired from this, i was changing some preferences in my events workflow. Mainly it was about showing some features from Photo Albums to Enable Discussions during event creation, editing or displaying. At one point suddenly i was able to add recurring events in frontend without any errors. Then i was undoing my recent changes, but never went back to the state, where it came to errors in frontend.

Finally, it works for me know, but i do not know why or what was the problem. Maybe, just opening and saving some fields in the workflow did the trick. If you can see anything in the dump, i would be curious, please let me know. But, as said, now it is working for me and you can close this case.

Thank you again and best regards
·
Saturday, 04 June 2022 21:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, from the output I can see that this variable "$eventParams" returns false so you will hit this error "0 Attempt to assign property "postdata" on bool" because if the variable is defined as a false value, it can't assign to any new property. (screenshot: https://monosnap.com/file/UVTclhi16B7Ef61xTMBuu7YyCt7lGf )

I suspect somewhere is not stored the event params value correctly in the event table under the `params` column it might be related to the event workflow and one of the fields might not sync the data correctly.

That is why when you save the event workflow again, it might be updated to the correct value so now you no longer encounter that issue now.

But I also wonder why this issue only happens on your site.

Since we can't access your site to investigate this issue, so you can keep us update if the issue still persists in the future.

By the way, glad to hear your issue resolved.
·
Sunday, 05 June 2022 11:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex,

thank you again for your help!
But I also wonder why this issue only happens on your site.

Yes and i wonder, why it is saving the event itself with all recurring informations, but not the recurring events.

However i am glad too, that it is working now fine and i will call you for help if this will happen in future again

Thank you and best regards
·
Monday, 06 June 2022 17:59
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome. Glad to hear that your issue has been resolved now.

Just for your information, I have locked and marked this thread as resolved to avoid confusion in the future. Please start a new thread if you have any other issues in the future so it will be easier for us to manage your inquiries.

Thanks for understanding.
·
Tuesday, 07 June 2022 10:36
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post