nylen / gutenberg-examples Goto Github PK
View Code? Open in Web Editor NEWMoved to https://github.com/WordPress/gutenberg-examples
Moved to https://github.com/WordPress/gutenberg-examples
Reported at: Automattic/jetpack#7597 (comment)
Example: https://github.com/nylen/gutenberg-examples/blob/6e369f8/01-basic/block.js#L20
The wp.i18n.__
function does not accept a domain (second parameter). i18n domain has yet to be implemented for these functions, and is still up in the air whether this is to be performed as part of the runtime call or during a build step.
See also: https://github.com/WordPress/gutenberg/tree/master/i18n
Just cloned and activated this plugin. Sadly, it doesn't work. Probably enqueue_block_editor_assets
action doesn't exist. Tried admin_enqueue_scripts
but that also ended up with errors.
categories.js:15 Uncaught TypeError: Cannot read property '__' of undefined
at Object.wp.blocks.Object.defineProperty.value (categories.js:15)
at __webpack_require__ (bootstrap 540c3e2…:19)
at Object.wp.blocks.exports.__esModule (index.js?ver=1498758919:814)
at __webpack_require__ (bootstrap 540c3e2…:19)
at Object.<anonymous> (index.js?ver=1498758919:22572)
at __webpack_require__ (bootstrap 540c3e2…:19)
at Object.wp.blocks.__webpack_exports__.a (index.js?ver=1498758919:18297)
at __webpack_require__ (bootstrap 540c3e2…:19)
at Object.<anonymous> (index.js?ver=1498758919:18890)
at __webpack_require__ (bootstrap 540c3e2…:19)
wp.blocks.Object.defineProperty.value @ categories.js:15
__webpack_require__ @ bootstrap 540c3e2…:19
wp.blocks.exports.__esModule @ index.js?ver=1498758919:814
__webpack_require__ @ bootstrap 540c3e2…:19
(anonymous) @ index.js?ver=1498758919:22572
__webpack_require__ @ bootstrap 540c3e2…:19
wp.blocks.__webpack_exports__.a @ index.js?ver=1498758919:18297
__webpack_require__ @ bootstrap 540c3e2…:19
(anonymous) @ index.js?ver=1498758919:18890
__webpack_require__ @ bootstrap 540c3e2…:19
wp.blocks.module.exports @ bootstrap 540c3e2…:65
(anonymous) @ bootstrap 540c3e2…:65
block.js?ver=1499268427:19 Uncaught TypeError: Cannot read property 'registerBlockType' of undefined
at block.js?ver=1499268427:19
at block.js?ver=1499268427:38
(anonymous) @ block.js?ver=1499268427:19
(anonymous) @ block.js?ver=1499268427:38
block.js?ver=1499268427:14 Uncaught TypeError: Cannot read property 'registerBlockType' of undefined
at block.js?ver=1499268427:14
at block.js?ver=1499268427:33
(anonymous) @ block.js?ver=1499268427:14
(anonymous) @ block.js?ver=1499268427:33
block.js?ver=1499268427:10 Uncaught TypeError: Cannot read property 'Editable' of undefined
at block.js?ver=1499268427:10
at block.js?ver=1499268427:46
(anonymous) @ block.js?ver=1499268427:10
(anonymous) @ block.js?ver=1499268427:46
block-build.js?ver=4.8:7 Uncaught TypeError: Cannot read property 'registerBlockType' of undefined
at block-build.js?ver=4.8:7
(anonymous) @ block-build.js?ver=4.8:7
gutenberg-tweaks.js?ver=4.8:2 Uncaught TypeError: Cannot read property 'registerBlockType' of undefined
at gutenberg-tweaks.js?ver=4.8:2
(anonymous) @ gutenberg-tweaks.js?ver=4.8:2
menu.js:358 Uncaught TypeError: Cannot read property 'withInstanceId' of undefined
at Object.<anonymous> (menu.js:358)
at __webpack_require__ (bootstrap 57f20ac…:19)
at Object.<anonymous> (index.js?ver=1498754823:16849)
at __webpack_require__ (bootstrap 57f20ac…:19)
at Object.<anonymous> (index.js?ver=1498754823:20674)
at __webpack_require__ (bootstrap 57f20ac…:19)
at Object.<anonymous> (index.js?ver=1498754823:20374)
at __webpack_require__ (bootstrap 57f20ac…:19)
at Object.wp.editor.__webpack_exports__.a (index.js?ver=1498754823:18641)
at __webpack_require__ (bootstrap 57f20ac…:19)
(anonymous) @ menu.js:358
__webpack_require__ @ bootstrap 57f20ac…:19
(anonymous) @ index.js?ver=1498754823:16849
__webpack_require__ @ bootstrap 57f20ac…:19
(anonymous) @ index.js?ver=1498754823:20674
__webpack_require__ @ bootstrap 57f20ac…:19
(anonymous) @ index.js?ver=1498754823:20374
__webpack_require__ @ bootstrap 57f20ac…:19
wp.editor.__webpack_exports__.a @ index.js?ver=1498754823:18641
__webpack_require__ @ bootstrap 57f20ac…:19
(anonymous) @ index.js?ver=1498754823:20931
__webpack_require__ @ bootstrap 57f20ac…:19
wp.editor.module.exports @ bootstrap 57f20ac…:65
(anonymous) @ bootstrap 57f20ac…:65
admin.php?page=gutenberg:1621 Uncaught TypeError: Cannot read property 'createEditorInstance' of undefined
at Object.<anonymous> (admin.php?page=gutenberg:1621)
at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,wp-a11y,plupload&ver=4.8:2)
at Object.add [as done] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,wp-a11y,plupload&ver=4.8:2)
at admin.php?page=gutenberg:1621
(anonymous) @ admin.php?page=gutenberg:1621
i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,wp-a11y,plupload&ver=4.8:2
add @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,wp-a11y,plupload&ver=4.8:2
(anonymous) @ admin.php?page=gutenberg:1621
Where to go from here?
Is it necessary to use filemtime to keep the JS copy fresh?
I got this error!
Warning: filemtime(): stat failed for /Users/local.dev/wp-content/plugins/gutenberg-examples/01-basic-esnext/block.build.js in /Users/local.dev/wp-content/plugins/gutenberg-examples/01-basic-esnext/index.php on line 12
It's showing up coz the built file is not there yet. I can see that but it might confuse a new user?
Hey, @nylen!
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.