Error Block Editor

Hello,
For some time now, I have been getting an error message when editing individual pages as soon as I try to edit blocks.
As soon as I switch off the Tainacan plug-in, the error no longer exists. Here is the error message.
I would be very grateful for your help

TypeError: Cannot convert undefined or null to object
at Function.entries ()
at http://XXXXXX:XX/wp-includes/js/dist/blocks.min.js?ver=7204d43123223474471a:10:33088
at a (http:// XXXXXX:XX /wp-includes/js/dist/blocks.min.js?ver=7204d43123223474471a:10:32215)
at qn (http:// XXXXXX:XX /wp-includes/js/dist/blocks.min.js?ver=7204d43123223474471a:10:33481)
at Un (http:// XXXXXX:XX:10048/wp-includes/js/dist/blocks.min.js?ver=7204d43123223474471a:10:31627)
at http:// XXXXXX:XX /wp-includes/js/dist/blocks.min.js?ver=7204d43123223474471a:10:33639
at Array.map ()
at Gn (http:// XXXXXX:XX /wp-includes/js/dist/blocks.min.js?ver=7204d43123223474471a:10:33622)
at Zn (http:// XXXXXX:XX /wp-includes/js/dist/blocks.min.js?ver=7204d43123223474471a:10:35074)
at http:// XXXXXX:XX /wp-includes/js/dist/blocks.min.js?ver=7204d43123223474471a:10:36374

Hi @Chris!

I’m sorry to hear that you are facing this. It is a hard one to debug, but we’ll see if we can find the cause. Can you please tell me which versions of WordPress, Tainacan and PHP are you using? And also, do you have the Gutenberg plugin enabled and which is the Tainacan block that you inserted there?

Meanwhile, in order to not block your page editing, I suggest, disable the plugin → go to the page → remove the block wrapper → activate the plugin again.

Hello Mateus,

thank you for your quick response:

I am using the following Versions:

Wordpress: 6.4.3

Tainacan: Version 0.20.8

PHP: 7.4.27

I enabled Gutenberg and I’m using Tainacan Collections Item List.

As I have a Multsite Installation I found out, that the other site/pages working without any problems.

But in the not working site I found a problem in the Tainacan Collections. When I edit an item and try to upolad it there is an error:

Kind Regards

Christian

Ok so the error ir possibly caused by another issue, but while we try to figure it out, it is important to know what caused that error 500. Server-side errors like that generate error logs that usually help us find the cause. Do you have access to the server error logs so we can take a look?

Hi Mateus,

this the error log file from yesterday - when the error occurred the first time.

Kind Regards

03-30-2024 @ 17:26:52 - Uncaught Exception: No entity was found with ID 5127 in /var/www/html/wp-content/plugins/tainacan/classes/entities/class-tainacan-entity.php:89
Stack trace:
#0 /var/www/html/wp-content/plugins/tainacan/classes/repositories/class-tainacan-item-metadata.php(167): Tainacan\Entities\Entity->__construct(5127)
#1 /var/www/html/wp-content/plugins/tainacan/classes/repositories/class-tainacan-item-metadata.php(55): Tainacan\Repositories\Item_Metadata->save_terms_metadatum_value(Object(Tainacan\Entities\Item_Metadata_Entity))
#2 /var/www/html/wp-content/plugins/tainacan/classes/repositories/class-tainacan-item-metadata.php(474): Tainacan\Repositories\Item_Metadata->insert(Object(Tainacan\Entities\Item_Metadata_Entity))
#3 /var/www/html/wp-content/plugins/tainacan/classes/api/endpoints/class-tainacan-rest-item-metadata-controller.php(249): Tainacan\Repositories\Item_Metadata->update(Object(Tainacan\Entities\Item_Metadata_Entity))
#4 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1193): Tainacan\API\EndPoint in /var/www/html/wp-content/plugins/tainacan/classes/entities/class-tainacan-entity.php on line 89

It looks like the plugin is trying to access an ID that does no exists anymore… My bet is that in one moment you created a taxonomy metadatum and associated it to a taxonomy that later was removed and does not exists anymore… we should find ways to detect this and avoid generating that error anyways… So the error appears when you edit an item, right? Can you confirm to us that all metadata have valid taxonomies associated to them? Would you have access to the database so we could search for that 5127 ID in the wp_posts table?

Hello Mateus,

sorry fpr not answering the last days, but due to the fact that the tainacan project is a private project, I had no time during the last days.

To your questions: I can’t find an ID 5127 in the wp_posts tabel and yes, all metadata have valid taxonomies. Right now teh Error 500 does not occuer any longer, but I can’t create new blocks.

Kind regards.

Christian