Broken block
-
Hi,
I’m currently testing the plugin and I’m having an issue where the phraseanet block isn’t working properly.
I use the free version of the plugin, with wordpress 6.1 and php 8.1, and firefox as a browser. I’m testing the plugin locally on my laptop, so unfortunately I can’t link to the page.
Steps to reproduce :
– create a new post
– insert a “phraseanet client block”
– edit the block settings in the side bar, for exemple add a block title
– publish the post
– view the pageInitially everything is displayed correctly, with a mosaic of thumbnails. However, if I click any of the thumbnails, instead of the image popping up, the whole phraseanet block disappear, with the following error in the browser console :
TypeError: d[0].color_palette is undefined
The issue seems to come from the post meta : if I delete _phraseanet_client_post_asset_details_color_palette from the postmeta table in the database, then the phraseanet block works correctly again.
And if I skip the step “edit the block settings in the side bar”, then the meta isn’t defined in the database in the first place, and the block works correctly.
Another hack that fixes the issue is to edit public/class-phraseanet-public.php, and delete the line 320 :
$assetDetailsColorPalette = get_post_meta($page_id, ‘__phraseanet_client_post_asset_details_color_palette’);
All this seems to point to a meta that doesn’t get initialized correctly. Hopefully you can reproduce the bug and fix this upstream with something better than my hack.
(By the way, in gutenberg I don’t see the control corresponding to this color_palette meta, is it a premium feature ?)
- The topic ‘Broken block’ is closed to new replies.