[wp-trac] [WordPress Trac] #46052: Classic Editor lacks (previously working) ability to remember media preferences

WordPress Trac noreply at wordpress.org
Tue May 28 16:19:03 UTC 2019


#46052: Classic Editor lacks (previously working) ability to remember media
preferences
-------------------------------------+---------------------
 Reporter:  ordresser                |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  5.2.2
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  close reporter-feedback  |     Focuses:
-------------------------------------+---------------------
Changes (by desrosj):

 * keywords:  needs-testing => close reporter-feedback


Comment:

 I did some testing on this today.

 The `image_default_link_type` option is used to control the preferred
 image Link To value. This can be set to three values: `none` (default for
 new installs since WordPress 2.7
 [https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-
 admin/includes/schema.php#L502 according to the database schema]), `file`,
 or `post`.

 For galleries, the proper way to override the default Link To value is
 using the `media_view_settings` filter to add `galleryDefaults` to the
 list of settings ([https://core.trac.wordpress.org/browser/tags/5.2.1/src
 /wp-includes/media.php#L3768 filter documentation]).

 These are the results of my testing:
 - While using the block editor with the image block, the option ''is not''
 respected in the Link To field.
 - When using the block editor with the Classic Editor block to insert an
 image, the option ''is'' respected in the Link To field.
 - While using the block editor with the gallery block, the default Link To
 value ''is not'' respected.
 - When using the block editor with the Classic Editor block to insert a
 gallery, the default value ''is'' respected.
 - When using the Classic Editor plugin, both plugins and images correctly
 respect the methods above.

 I went back and tested version 4.9 (before the block editor was merged)
 and I could not reproduce the behavior you describe. After inserting an
 image or gallery, if the Link To is changed, the value will persist on
 that specific image but nowhere else. I couldn't find any code indicating
 this was the case.

 @ordresser is it possible that you had a plugin active that would remember
 the preference on a per user basis? Or, had you modified the
 `image_default_link_type` at some point?

 Because I can't reproduce the behavior described in earlier versions, I am
 going to mark this as a `close` candidate. If @ordresser is able to
 provide more details showing that link preference was remembered by
 default in Core, it can be investigated further.

 I have opened [https://github.com/WordPress/gutenberg/issues/15865
 GitHub-15865] to investigate situations where these filters are not
 respected in the block editor.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46052#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list