front / cloud-blocks Goto Github PK
View Code? Open in Web Editor NEWWP plugin for Gutenberg Cloud – Your library of blocks in the cloud!
Home Page: https://gutenbergcloud.org
WP plugin for Gutenberg Cloud – Your library of blocks in the cloud!
Home Page: https://gutenbergcloud.org
Something is going wrong while uploading a zip file of a block.
I've checked my wp-content/uploads/gutenberg-blocks
direcory and the content of the block was uploaded, but it is in the root (not under the block folder as expected).
Tested on several multisite networks and if, and only if, network activated it does not load any blocks on admin Cloud Blocks page.
If activated per site it works, so it's not multisite related, but the type of activation. If per site activated first, then network activated later, it stops working, even if site activated on all the sites.
A script is not loaded on the admin page, it seems, but no console errors.
Only difference between network activation and site activation is the order of including the main plugin file, but haven't been able to find the actual reason for this strange behaviour by studying the code.
Since this is the block manager, it would be good to be able to upload zips for non Git people to use custom blocks outside of the cloud.
I was testing private blocks and I realized that the same editor.css file was included 3 times (the same number of my private blocks) in the page.
If this plugin is Network Activated only (not per site) the first time, the table "cloud_blocks" is not created when a site is accessed (and this plugin loaded).
WordPress database error Table 'mydbname.myprefix_3_cloud_blocks' doesn't exist for query SELECT * FROM nytt_3_cloud_blocks made by require('wp-blog-header.php')[,...,] WP_Hook->apply_filters, CloudBlocks\Blocks\Blocks->blocks_register_styles, CloudBlocks\Blocks\Options::get_all
This because the custom table creation is only called at plugin activation.
For a plugin, that creates persistent changes like this, to be network (Multisite) ready , it must check that it's installed upon loading (at least admin_init) by an option or directly checking existence of the resource (table). If not, run the installer on that site to create the tables.
Looping through sites at activation is not recommended as it dosn't take are of new sites added later.
I suggest get_option( 'cloud_blocks_installed' )
or similar in this case.
There is a tab for installed blocks, but it is also relevant to show the blocks which are not installed. Per now the only way is to hover over blocks in the other tabs to check each block. Perhaps a new tab "Not installed" should be added?
Hitting refresh fixes it. I have only seen it happen when there are different WP flash message updates from other plugins at the top of the page. Not sure if related, tho.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.