[wp-trac] [WordPress Trac] #38415: New Custom Link menu item has a wrong fallback label

WordPress Trac noreply at wordpress.org
Tue Jun 25 21:45:33 UTC 2019


#38415: New Custom Link menu item has a wrong fallback label
-------------------------------------------------+-------------------------
 Reporter:  afercia                              |       Owner:  afercia
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.3
Component:  Menus                                |     Version:  4.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots good-first-bug has-  |     Focuses:  ui
  patch                                          |
-------------------------------------------------+-------------------------
Changes (by afercia):

 * keywords:  has-screenshots good-first-bug has-patch commit => has-
     screenshots good-first-bug has-patch


Comment:

 Thanks everyone! I tried to look a bit more in depth into this and there
 are a few things to consider. Testing with JavaScript support disabled and
 enabled:

 **JavaScript disabled:**
 When adding menu items, an additional string `(Pending)` gets appended to
 the item name. Also, a notice "Click Save Menu..." appears at the top:

 [[Image(http://cldup.com/dXLp0ChW_X.png)]]

 Looks like this part was never implemented in the JavaScript-based
 implementation.

 **JavaScript enabled:**
 The additional string `(Pending)`
 [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/ajax-
 actions.php?rev=45507&marks=1426#L1422 is intentionally not displayed].
 Also the notice doesn't appear.

 To respect the original implementation, the string `(Pending)` shouldn't
 be displayed. I'd like to propose to just restore the original behavior:
 when a custom link text is empty, a default "Menu Item" string is used as
 fallback.

 I've noticed a couple inconsistencies in the PHP part and I'm not sure the
 Custom Links are fully functional when JavaScript is disabled but seems to
 me those are pre-existing issues. Considering the Menu page will be
 refactored soon to use blocks, I'd tend to think the best option is to
 restore a mechanism to have the fallback to athe"Menu Item" string.

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


More information about the wp-trac mailing list