felixarntz / attachment-taxonomies

This plugin adds categories and tags to the WordPress media library - lightweight and developer-friendly.
https://wordpress.org/plugins/attachment-taxonomies/
GNU General Public License v3.0
29 stars 6 forks source link

Error while attempting to upload new file. #20

Closed lucymtc closed 11 months ago

lucymtc commented 1 year ago

Hi! I am running into a JavaScript error while attempting to upload a new file. Error in the console:

Screenshot 2023-10-23 at 08 21 11

Plugin Version 1.2.0

Browsers: Google Chrome Version 118.0.5993.88 Safari Version 16.6 Firefox Version 118.0.2

Steps to replicate:

lucymtc commented 11 months ago

Hi @felixarntz, I have opened a PR to fix this error https://github.com/felixarntz/attachment-taxonomies/pull/21

felixarntz commented 11 months ago

@lucymtc Thank you for opening the issue and implementing a PR!

I worked through your steps to replicate, but couldn't reproduce the problem. The image uploaded just fine for me in the image block. Can you provide a bit more context? For example:

Those are just potential considerations, but really anything you can think of as potentially impactful.

lucymtc commented 11 months ago

Hi @felixarntz thanks for getting back. I was able to replicate the issue on the WP instance that spins up from the contributing guidelines. No plugins were added, I didn't have any default category set. The error occurs only after having created some categories or tags and then try to upload the image from the Image block (with empty terms the image uploads fine). Please let me know if you need any other information. Thanks!

felixarntz commented 11 months ago

@lucymtc Thanks for clarifying. I've tested this again, and I was able to replicate it. It doesn't happen immediately after the upload in the image block, it only happens when I then open the Media Library. Great catch!