Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media_view_strings filter execution order not consistent with classic editor #9884

Closed
iandunn opened this issue Sep 13, 2018 · 5 comments · May be fixed by makbarGroup/gutenberg#31
Closed
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Media Anything that impacts the experience of managing media [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes.

Comments

@iandunn
Copy link
Member

iandunn commented Sep 13, 2018

When adding images to a Gallery block, the button on the final step has an empty string inside it, instead of Insert into Post.

To Reproduce

  1. Add a Gallery block
  2. Click on Media Library button
  3. Click on the Media Library tab (if not already selected)
  4. Select multiple images
  5. Click on Create a new gallery button

Screenshots

screen shot 2018-09-13 at 1 44 00 pm

Desktop (please complete the following information):

  • OS X 10.13.6
  • Firefox 63
  • Gutenberg 3.8.0
@iandunn iandunn added [Type] Bug An existing feature does not function as intended [Feature] Media Anything that impacts the experience of managing media labels Sep 13, 2018
@Soean
Copy link
Member

Soean commented Sep 14, 2018

I can't reproduce this issue on 3.8
bildschirmfoto 2018-09-14 um 11 35 26

@iandunn
Copy link
Member Author

iandunn commented Sep 14, 2018

Ah, you're right, it's a plugin conflict. I should have checked that first.

https://github.com/Codeinwp/themeisle-companion/blob/3ef1a45/obfx_modules/mystock-import/init.php#L239

What they're doing works in Classic, though, so it may still be a back-compat issue. The problem seems to be that, in the Classic editor, the media_view_strings filter is called before admin_enqueue_scripts is fired by admin-header.php; but in Gutenberg it's the opposite.

cc @abaicus, @selul as an FYI

@iandunn iandunn added [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes. Backwards Compatibility Issues or PRs that impact backwards compatability and removed [Type] Bug An existing feature does not function as intended labels Sep 14, 2018
@iandunn iandunn changed the title Gallery "insert into post" button has empty string media_view_strings filter execution order not consistent with classic editor Sep 18, 2018
@danielbachhuber
Copy link
Member

What they're doing works in Classic, though, so it may still be a back-compat issue. The problem seems to be that, in the Classic editor, the media_view_strings filter is called before admin_enqueue_scripts is fired by admin-header.php; but in Gutenberg it's the opposite.

Related #4929

@johnbillion johnbillion added this to the WordPress 5.0 milestone Oct 12, 2018
@antpb
Copy link
Contributor

antpb commented Oct 29, 2018

@johnbillion is this still valid after #10660 ?

I noticed you added the 5.0 milestone and then a few days after, the above PR was merged. I think the changes made will solve this. Want to verify.

@johnbillion
Copy link
Member

I added it as it's closely related to #4929 which was in the 5.0 milestone. It does indeed look like this was fixed in #10660. Closing off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Media Anything that impacts the experience of managing media [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants