Forums | Mahara Community
Support
/
Page in portfolio is inaccessable
07 November 2024, 1:40
We have a user who is developing their portfolio and a page is throwing an error - "
Site unavailable
A nonrecoverable error occurred. This probably means you have encountered a bug in the system"
I have looked at the database view, artefact, and block_instances tables in the database to see if there are any issues with the data records in there. I can see any particular issues as the records look similar to records for working pages.
I have tailed the error logs for the view id but nothing is outputting in the logs. I have also tailed against the artefact id and block_instance id these also return no output.
I think this output is relevant to the issue but doesn't have any related ids or urls -
[Wed Nov 06 12:36:12.603579 2024] [php:notice] [pid 639765] [WAR] c7 (blocktype/lib.php:1324) unserialize(): Error at offset 45 of 65535 bytes
[Wed Nov 06 12:36:12.603621 2024] [php:notice] [pid 639765] Call stack (most recent first):
[Wed Nov 06 12:36:12.603626 2024] [php:notice] [pid 639765] * log_message(string(size 48), integer, true, true, string(size 50), integer) at /opt/packages/mahara-site/htdocs/lib/errors.php:522
[Wed Nov 06 12:36:12.603631 2024] [php:notice] [pid 639765] * error(integer, string(size 48), string(size 50), integer) at Unknown:0
[Wed Nov 06 12:36:12.603635 2024] [php:notice] [pid 639765] * unserialize(string(size 65535)) at /opt/packages/mahara-site/htdocs/blocktype/lib.php:1324
[Wed Nov 06 12:36:12.603638 2024] [php:notice] [pid 639765] * BlockInstance->get(string(size 10)) at /opt/packages/mahara-site/htdocs/blocktype/text/lib.php:63
[Wed Nov 06 12:36:12.603642 2024] [php:notice] [pid 639765] * PluginBlocktypeText::render_instance(object(BlockInstance), false, false) at /opt/packages/mahara-site/htdocs/blocktype/lib.php:2048
[Wed Nov 06 12:36:12.603647 2024] [php:notice] [pid 639765] * BlockInstance->render_viewing(false, false) at /opt/packages/mahara-site/htdocs/lib/view.php:2773
[Wed Nov 06 12:36:12.603651 2024] [php:notice] [pid 639765] * View->get_blocks() at /opt/packages/mahara-site/htdocs/view/view.php:560
[Wed Nov 06 12:36:12.603655 2024] [php:notice] [pid 639765]
[Wed Nov 06 12:36:12.605256 2024] [php:notice] [pid 639765] [WAR] c7 (lib/errors.php:537) [TypeError]: array_key_exists(): Argument #2 ($array) must be of type array, bool given at /opt/packages/mahara-site/htdocs/blocktype/text/lib.php:70
[Wed Nov 06 12:36:12.605277 2024] [php:notice] [pid 639765] Call stack (most recent first):
[Wed Nov 06 12:36:12.605282 2024] [php:notice] [pid 639765] * exception() at Unknown:0
[Wed Nov 06 12:36:12.605300 2024] [php:notice] [pid 639765]
Can anyone give any advice on this issue?
11 November 2024, 10:23
Hi James,
Can you tell me which version of Mahara the website is, so I can match up the error messages in your log output?
If you can find the block ID, look in the table called 'block_instance' for the block and look for the configdata. You will see something similar to the following:
s:4:"text", s:3:"abc"
If the number of characters between the quotes doesn't match the number on the left, it can be problematic to unserisalise and display.
Kind regards,
Doris
12 December 2024, 22:07
Hi James and Doris,
We have the same problem on our Mahara platform. Our Mahara version is 24.04.7.
We are looking for the link between an user and a block in the database, in order to identify the blocks attached to the user.
Could you please help us ?
Cordially,
L.D.
PS : here is the error message in our side
[12-Dec-2024 09:45:54 Europe/Paris] [WAR] 53 (blocktype/lib.php:1324) unserialize(): Error at offset 45 of 65535 bytes [12-Dec-2024 09:45:54 Europe/Paris] Call stack (most recent first): [12-Dec-2024 09:45:54 Europe/Paris] * log_message(string(size 48), integer, true, true, string(size 58), integer) at /var/www/vhosts/eportfolio.univ-rouen.fr/lib/errors.php:522 [12-Dec-2024 09:45:54 Europe/Paris] * error(integer, string(size 48), string(size 58), integer) at Unknown:0 [12-Dec-2024 09:45:54 Europe/Paris] * unserialize(string(size 65535)) at /var/www/vhosts/eportfolio.univ-rouen.fr/blocktype/lib.php:1324 [12-Dec-2024 09:45:54 Europe/Paris] * BlockInstance->get(string(size 10)) at /var/www/vhosts/eportfolio.univ-rouen.fr/blocktype/text/lib.php:63 [12-Dec-2024 09:45:54 Europe/Paris] * PluginBlocktypeText::render_instance(object(BlockInstance), false, false) at /var/www/vhosts/eportfolio.univ-rouen.fr/blocktype/lib.php:2048 [12-Dec-2024 09:45:54 Europe/Paris] * BlockInstance->render_viewing(false, false) at /var/www/vhosts/eportfolio.univ-rouen.fr/lib/view.php:2773 [12-Dec-2024 09:45:54 Europe/Paris] * View->get_blocks() at /var/www/vhosts/eportfolio.univ-rouen.fr/user/view.php:114 [12-Dec-2024 09:45:54 Europe/Paris] [12-Dec-2024 09:45:54 Europe/Paris] [WAR] 53 (lib/errors.php:537) [TypeError]: array_key_exists(): Argument #2 ($array) must be of type array, bool given à /var/www/vhosts/eportfolio.univ-rouen.fr/blocktype/text/lib.php:70 [12-Dec-2024 09:45:54 Europe/Paris] Call stack (most recent first): [12-Dec-2024 09:45:54 Europe/Paris] * exception() at Unknown:0 [12-Dec-2024 09:45:54 Europe/Paris]
12 December 2024, 23:53
Hi again,
We have found the origin of our problem. The user inserted too much text in a text block on his profile page ... So, the serialize content which as been recorded in the block_instance table (in configdata attribute) was truncated and corrupted ...
A function that will control the size of the text before recording it ine the database will be a good idea ...
Cordially.
L.D.
10 March 2025, 10:44
Hi Lilou,
A 'Text' block can take up to 4GB of data. Recently, we've had a couple of cases where there was an issue in MySQL when an upgrade step from a few years ago did not change the 'configdata' field from 'TEXT' to 'LONGTEXT'. Can you please check that? If it's still only on 'TEXT', you can change it and should also change the 'configdata' field in the table 'blocktype_instance_backups' if you are on Mahara 24.04.
Thank you
Kristina
14 December 2024, 2:48
Thanks Doris,
I will look into the configdata.
The issue was reported on 24.04.07, we are upgrading to 24.04.08 next week.
Thanks
James