-
Notifications
You must be signed in to change notification settings - Fork 14
editor.PostFeaturedImage example throws an error #17
Comments
Hi @scofennell, It looks like your code is producing something pretty close to the expected result. Is the "Set Featured Image" button functional? You could |
Hi Daniel, thank you for the response to my humble comment! I should have been more clear. I agree that the demo strings of text are appending and prepending as advertised, but see this gif demonstrating that the featured image control does actually break when this code is executing: https://media.giphy.com/media/51Y3t4wvBQpllUTKeK/giphy.gif I added SCRIPT_DEBUG to wp_config (I already had WP_DEBUG and SAVEQUERIES) and I find that I get this error when selecting an image:
Also, I get the following error as soon as the page loads:
One more note. See below for how I am registering my js file. I have found recently that a fair amount of user error seems to come from failing to declare the proper dependencies. See anything wrong here?
(I do go on to enqueue this of course, at |
Hi @scofennell, I think the problem is your use of I'm not sure whether that's using Underscore or lodash. Could use |
Also worth noting: I tried reproducing this issue locally against WordPress trunk and wasn't able to. Which version of WordPress are you using? |
Hi Daniel, thank you again so much for the help. I'm experienced with WP but quite new with Gutenberg -- I was actually hoping that by copying the approach in your documentation, I might begin my journey here in earnest. I'm afraid I don't know how to approach this via To your question, is this using underscore or Lodash, I guess I don't know. I'm just trying to follow the example in your documentation and I'm not aware of what the dependencies might be. I get the same error each time with a completely reduced test case: Zero plugins, with my code running as the only code in a child theme off of twentynineteen. Tried with core nightly point release, core nightly bleeding edge, and 5.0.3. |
Hi, thank you very much for your awesome work here.
I am attempting to output a simple bit of text after the featured image picker via the example at https://github.com/danielbachhuber/gutenberg-migration-guide/blob/master/filter-admin-post-thumbnail-html.md .
See screenshot, I get
TypeError: t is not a function
.In order to reproduce the error, you must click on the featured image UI and select an image.
I would be more than happy to migrate this comment to a more appropriate venue if you could be so kind to suggest one. Thank you again for your awesome work!
The text was updated successfully, but these errors were encountered: