Problem/Motivation

(See this set of meetings notes for a much longer version)

In 8.0.x HEAD there are many ways of providing menu links:

  • In code, in modules' .links.menu.yml files
  • Manually entered in the UI (Menu UI + Menu Link Content modules, Shortcut, Link, etc.)
  • Configured on nodes directly on the node/X/edit form (link to *this* node)
  • Enabled as an option when editing a Views display (link to *this* view)

The #2 case where a user directly enters a menu link in the UI is problematic. Consider the following two user stories (there's a more complete list):

  • As a content author, I want to create an "About" page (/content/about) with a link in my main site navigation, and I don't want that link to break when I edit the page later to change the page title/path to "About Us" (/content/about-us).
  • As a site builder, I want to set up a link to /blog that currently points to View, but later I will remove the View and create a Panel Page at /blog with lots of blocks.

In Drupal 6/7, user-entered paths are resolved to their system paths, so for example "/about" would get stored as "node/4" and "/blog" would get stored as "/blog" (since the user-entered path on a View is the system path). Therefore, both use cases pass.

In Drupal 8 right now, user-entered paths are resolved to their route name + parameters, a level below that of system path. This resolves use case 1, but causes use case 2 to fail. A menu link created to "/blog" would be saved as "view.views.blog". There would be no way of replacing it with a Panel page at a route like "panel.page.blog,"even though both items were at the same system path ("/blog").

Drupal 8 is further complicated by the fact that there is no longer a 1-to-1 relationship between a route and a path (as there was in Drupal 7), because (by design) a single path can point to multiple routes. One example is node/1, as node/1 could be served as json/html via GET or POST.

TL;DR In code, routes are canonical, but there are use cases for paths in the UI and in storage.

Proposed resolution

Statically-defined links (those defined in code) should continue to always use route names, since they are the most reliable. However, we should treat user-entered links differently, depending on the scenario:

  1. "Thing" (entity) reference, e.g. a reference to node 1 or view foo that follows it around regardless of system path or URL alias. Could ultimately be implemented as an "entity picker" interface. (To be discussed at #2407913: Discuss/define the minimal UX for adding menu links to entities)
    This uses the entity: scheme.
  2. "Path" reference , e.g. a reference to "/blog" that doesn't attempt to resolve to system path/route, a path like user/register that doesn't map to an entity, or a reference to an external URL. Paths might or might not be aliased or include a language prefix. If the path of a route changes, the links will stop linking to that route and will link to whatever new thing is at the user-typed path. If there's no new thing there, the link will break.
    This uses the user-path: scheme.

This necessitates adjustments to the way that menu links which are created from the UI are stored.

Menu link UIs and their use cases

The various UIs provided by core are:

  • Menu UI: Need option of user entering both an entity reference and a path reference, since there are reasonable use cases for both. Resolved at menu rebuild time.
  • Link field: No way to predict what a user will want, so store whatever they type. Resolved at run-time. (Note: resolving at run time does mean a performance hit, but that may be mitigated by render caching, and was considered acceptable in terms of making the implementation simple and robust in terms of respecting the user's intent.)
  • Entity reference field: It's safe here to assume the user means "always link to this thing, even if the path changes."
  • Shortcut: Shortcuts normally got to admin paths, but there are also instances where use case #2 could come into play (e.g. admin/content pointing to a view at first, a panel later). There may also be use-cases for using it as a "bookmark" tool as well. Probably treat the same as menu UI?
  • Node form It's safe here to assume the user means "always link to this thing, even if the path changes." Store essentially a "self" entity reference.
  • Views UI
    People use the Views UI for creating links in three ways:
    1. Create a menu link to this view. (no change needed)
    2. Create another type of link such as a "more link" that may include tokens
    3. Rewrite the content of a views field to be a link

    The first case works fine. Store essentially a "self" entity reference. For the second/third case, store what the user entered, resolve at run-time.

Menu link storage on the back-end to support these use cases

Various options are discussed below about how to store links on the back-end (since figuring this out blocks the Drupal 8 beta upgrade path). The original proposal was to take each UI on a case-by-case basis and provide one or both of the reference type fields based on the context and our best guess on what the majority use case is.

However, some holes were poked in that solution, and the conversation has progressed since then discussing various alternatives. The solution that seems to have the most consensus as of 2015-01-20 (from webchick, catch, larowlan, plach) is in #15 and was refined at the D8 Accelerate sprint in NJ:

Have a link field item always store URIs (in HEAD, before this meta, LinkItem's uri property sometimes contains paths instead of URLs). And invent two new schemes entity: (URIs that resolve to entity URLs) and user-path: (URIs that resolve to either routed URLs or unrouted (base:) URLs). So, if the user types blog, store user-path:blog. If the user types 'http://example.com', store that. If the user selects node 1 from some kind of ER selection plugin, then store entity:node/1..

This way, the same link field would work for all use cases defined above - shortcuts, menu links, and entities configured to have a link field via Field UI will share the same storage model and UI patterns.

It would have 3 columns: title, uri, and options.

For menu link discovery we need to exclude entity links when updating route/parameters in the menu tree. This could be done either with NOT LIKE('entity:%') or by adding a boolean field to menu links, no widget, and do the same logic on save. We also need to add description column (or otherwise handle description translation) on the link field, right now while it supports options/attributes there's no UI for them.

UI-wise, the initial patch would just be a text input for the uri/path. Follow-up patches could provide a fancier widget for an entity picker, plus a field for user-entered path (but these would not be critical, since they could also happen in 8.1.x+).

Remaining tasks

  1. (done) Create necessary sub-issues
  2. (done) Make sure we're not missing anything with this approach.
  3. (done) Code it up!
  4. update change record

User interface changes

Not at first, but sub-issues may introduce further ones.

API changes

We would introduce Drupal-specific and "Drupal site-relative" entity: and user-path: URI schemes, which are automatically resolved to the corresponding ("materialized") URLs. Possibly others; see sub-issues.

Comments

pwolanin’s picture

webchick’s picture

xjm’s picture

Issue summary: View changes
dawehner’s picture

Added an issue for peter

webchick’s picture

Issue summary: View changes

Clarifying the relationship between #2407587: Allow multiple target entity types in the entity reference field and #2407913: Discuss/define the minimal UX for adding menu links to entities in the issue summary, based on discussion in the former.

webchick’s picture

Issue tags: +Triaged D8 critical

On our branch maintainer call today, we all agreed this was indeed a critical. Tagging.

amateescu’s picture

I gave this a lot of thought after reading the outcome of the recent meeting and I think I have a viable alternative.

Let's start with the biggest (or single) shortcoming of the current link field: it has to denormalize a user-entered path into a route name and route paramateres because the new routing system is faster at generating links based on those two properties. The problem with this denormalization is now quite well documented in the issue summary, the /blog path use case.

TL;DR Rewrite the 'link' field type so it doesn't store any information about the route or path anymore but reference another object where those details are stored. In this way, there is a single place (e.g. db table) that needs to be updated when a route name is updated on router rebuild.

Some fundamental points of this proposal, all in the context of the current issue summary:

  • A menu item is basically composed of a link (internal or external) and a hierarchy.

    The 90% / 10% separation between "Select from your existing content" and "Enter a path (internal/external)" is probably a good estimate for site visitor facing menus, but what about site admin facing menus like "Administration"? That one is also editable in Menu UI and if we force every item there to be a path reference, wouldn't that make it quite slow to render?

  • A shortcut is just an internal link.

    Because shortcuts 99% of the time go to admin paths, resolve these to a route, so links stay working even if a module changes from admin/foo to admin/bar. Store a route reference.

    This is not true. Admin paths can also be provided by views (like many content entity listings in D8) that could be switched to a panel for whatever reason, just like the /blog case for menu links. So a shortcut's link has exactly the same needs as a menu item's link, without the external part.

  • Link field serves many use cases, so we can't predict what people will want.

    The link field has the same use case as menu items: link to an internal or external path.

Given the points above, I still think that the base data model should not be dictated by the UI (the 90% existing content / 10% path separation) but architected around a proper link field implementation which can be used by menu items, shortcuts and every other project-specific entity type that needs it.

So here's a concrete proposal for how we can fix the issues with the current link field and satisfy all use cases:

1) create a new entity type, let's call it 'cached_path' for now, with these properties/fields: 'route_name', 'route_parameters', 'options', 'path' (which *always* stores the exact user-entered path) and maybe 'external'.

2) scratch the current code of the link field and rewrite it like this:

  • extend the EntityReference field type with two additional properties: 'title' and 'target_entity_object' (or something similar)
  • hard-code the 'target_type' field storage setting to the 'cached_path' entity type
  • use most of the code from the current link widget for the MVP, which is just a textfield that accepts a path as input
  • the widget will create (or update) the referenced 'cached_path' entity
  • the 'title' property allows a user to enter an optional title for this link, but it's only optional if we determine that the path is internal in a validation step
  • the 'target_entity_object' property will store data like <entity_type>:<entity_id> if we determine that the path is a) internal and b) it links to an entity, which helps with querying menu items that reference existing content

Some other random thoughts:

- the only reason to expose 'cached_path' as an entity type is to be able to re-use as much existing code in HEAD as possible, like the ER field and maybe the KeyValue entity storage; it will have to be as "slim" as possible, probably not a content entity and just extend the base Entity class directly in order to skip the overhead of typed data
- having it as an entity type is definitely not the central point of this proposal, we just need the link field type to reference "something"

I realize most people are already sick and tired of this problem space but since I already put a lot of time into designing this system before the "new plan for menu links" came up last year, I think it may still be useful to analyze all possible options :)

Edit: fixed a missing [code] tag.

pwolanin’s picture

@amateescu - I don't think your proposal addresses as completely the cases address in the issue summary. I don't think it makes sense to try to force all these into one solution when they actually behave differently - I'm sorry you weren't on the call where we talked through each one.

chx’s picture

Edit: removed.

amateescu’s picture

I agree that the UI part is really tricky to get right, but if we do the separation at the base level aren't we limiting the UI choices? A field type can have a widget with two inputs but two field types can not have a single widget in case we find a solution to reference both existing content and paths in a single input.

Maybe my previous comment was too much to take in at once, so I'll try to be more clear.

  1. Because shortcuts 99% of the time go to admin paths, resolve these to a route, so links stay working even if a module changes from admin/foo to admin/bar. Store a route reference.

    Do we agree that shortcuts can also link to paths for which the route name can change, like admin/content, so storing a route reference will not work?

  2. Link field serves many use cases, so we can't predict what people will want.

    Can it link to something that a menu item can not?

dawehner’s picture

Do we agree that shortcuts can also link to paths for which the route name can change, like admin/content, so storing a route reference will not work?

Yeah, we have to talk about those ones in more detail, no question. That is a valid point, but you also have to see, that those at least don't break things for the site visitors.

I agree that the UI part is really tricky to get right, but if we do the separation at the base level aren't we limiting the UI choices? A field type can have a widget with two inputs but two field types can not have a single widget in case we find a solution to reference both existing content and paths in a single input.

Well, I think if you really want that to have it, we could develop a field type which contains both a (D)ER field and a path at the same time,
but again, as chx wrote, the issue summary says, etc. just a path is not enough.

Link field serves many use cases, so we can't predict what people will want.

IMHO menu items are conceptually a part of Drupal, while link items could be used to just store paths, for example as backend for some sort of REST stuff.

amateescu’s picture

That is a valid point, but you also have to see, that [shortcuts] at least don't break things for the site visitors.

Unless you want to use them as a "bookmark this page" feature, which IMO is a perfectly valid use case for them.

Well, I think if you really want that to have it, we could develop a field type which contains both a (D)ER field and a path at the same time

Which is exactly the field type architecture proposed in #7 for a proper link field? :) Except the (D)ER part is just the ''target_entity_object'' property which stores a <entity_type>:<entity_id> string and the 'path' is a reference to the 'cached_path' object which can be updated on router rebuild.

@catch said in #2407587-23: Allow multiple target entity types in the entity reference field

the core use-case only requires basic EntityFieldQuery (find the menu links referencing X entity) and entity loading (load the entity referenced by Y menu link)

which is supported by the proposal above.

IMHO menu items are conceptually a part of Drupal, while link items could be used to just store paths, for example as backend for some sort of REST stuff.

The could part is a bit ambiguous in your answer. Maybe I need to rephrase the question: If we want to support linking to internal paths/routes/whatever in the link field, doesn't that mean we need the exact same linking capabilities that menu items have?

pwolanin’s picture

Issue summary: View changes
catch’s picture

OK after reviewing amateescu's proposal and discussing a fair bit in irc, here's my current thoughts:

Things that seem obvious

- the fundamentals of storing an entity reference or a literal path but nothing else remains the same with both proposals.

- we accepted on the call that shortcut has to make a decision on route vs. path (because 99% of shortcuts are added from the page, not a form), and either way will break in some cases. It's arguable which case will break more - depends on what gets added. I think it's reasonable for shortcut module to be refactored to use the link field regardless of whatever else happens.

- if menu links are going to store a literal path, then using the link field for the literal path storage seems reasonable unless there were massive obstacles to doing so.

- I don't think we agreed two entity types, one entity type with two bundles, or a single bundle for menu links on the call at all (though Peter seemed to think we had? but I definitely hadn't at least). My preference is for a single bundle.

Things I think more discussion/am not sure about personally

1. Whether or not the shortcut move to link field is critical or not.

2. I'm not at all sure whether it's a good idea for the link field to add entity reference support. To be honest, that sounds like a field collection with a DER + link field. I'm not suggesting we add field collection to core however.

3. I can see the use case for link or entity ref generically - i.e. we know we have that with menu links, and it could be used for something like a 'further reading' field that allows both external and internal references side by side. Whether that should be in a single field type or a combi-field is the sticking point since the use cases for the separate types seem more numerous than for the combination.

4. It's a side issue, but we've not discussed for either menu link or shortcut is whether query arguments should or could be respected. If we're storing literal path input then as a user I'd expect that to persist (i.e. a link to the RTBC queue). Do we need a separate issue for that?

Really contentious and also not sure about personally

1. Two fields, one DER and one link. Some additional logic (where? entity form?) makes the UI smoother and ensures they're mutually exclusive. This could be used as a pattern by other modules but isn't 100% re-usable as is. However DER and link field are clearly reusable independently and there's use cases for both separately.

2. One field that combines the storage model of link and DER, and the logic to keep those mutually exclusive would be handled at the formatter/field level. This could be re-used elsewhere but there are limited use cases for that field type compared to the two separately.

effulgentsia’s picture

1. Two fields, one DER and one link...
2. One field that combines the storage model of link and DER...

I think both of those options from #14 assume that some kind of DER field type gets added to core in #2407587: Allow multiple target entity types in the entity reference field. If that happens, then great, but I think there's also some good arguments on the issue against it. In the event that we "won't fix" that issue, I'd like to suggest a 3rd option to add to the above:

3. Have a link field item store "path" (what LinkItem::propertyDefinitions() currently calls 'url', except it's not always a full URL). And invent a new scheme: 'entity'. So, if the user types 'blog', store 'blog'. If the user types 'http://example.com', store that. If the user selects node 1 from some kind of ER selection plugin, then store entity://node/1. And if the user selects the frontpage view, store entity://view/frontpage.

pwolanin’s picture

I'm opposed to trying to make one field that combines the storage model of link and DER (in other words, a multi-column storage). We would be digging ourselves into a huge hole there, and this task will not get done.

Let's talk about storage more than UI - that's really what we need to finalize:

  • Link Field:
    Just store the user entered path in a text field, resolve at runtime.
  • Menu Link Content: options
    1. 2 entity types, 1 with DER base field, 1 with a path base field. This is the cleanest in terms of plugin derivative discovery logic (we could have a wizard that lets you create one or the other fro the same form).
    2. 1 entity type, 1 bundle, with both a DER and path base field, some tweak to the entity form and validation to make them mutually exclusive. The plugin derivative discovery would be a bit of a hack here, but probably something we could live with.
    3. 1 entity type, 2 bundles, hide one of DER or path field based on bundle. This seems too ugly to consider seriously.
  • Shortcut: options
    1. Just store the user entered path, resolve at runtime (same as Link field)
    2. Just resolve the user-entered path to route and params, store those (doesn't support external link, unique storage?)
    3. Have both a DER field and a path field (same storage as menu link options 2 & 3), resolve at run time
    4. Have both a DER field and a path field (same storage as menu link options 2 & 3), plus also store the entity route

IMPORTANT NOTE: this list does not include all possible options, but is the list of options that I think we could feasibly accomplish in the near term (i.e. so this issue is not the last one blocking the upgrade path).

effulgentsia’s picture

I'm not at all sure whether it's a good idea for the link field to add entity reference support.

With #15.3, we'd at least have that at the storage level. And even with the link field's default widget, someone would be able to type 'entity://node/1'. Contrib could then decide if it wants to offer up a better widget that integrates with ER selection plugins.

webchick’s picture

I have to say that at a glance I do like the proposal in #15.3. Storage is just a text field, which keeps things simple, and the linking mechanism leverages systems already in core. It also means we no longer need to guess what the 90% case is on e.g. a shortcut link, because a "power user" could just add either "blog" or "entity://node/1" and thereby specify exactly what they meant.

pwolanin’s picture

Having more discussion in IRC with catch and larolan (and webchick until she had to go fly) - coming to some agreement that possibly the approach of 15.3 could be used for a single link field that we apply to all 3 use cases.

The link field would have 4 columns: title, description, uri (or path), and options.

1st patch would just be a text input for the uri/path

follow-up patches would make the widget fancier so it would have a DER-like entity picker plus a field for user-entered path.

For menu links we'd add an extra boolean base field not exposed in the UI to flag those with non-entity paths to be re-resolved on menu rebuild.

catch’s picture

Just discussed entity:// in irc with larowlan and pwolanin.

For discovery we need to exclude entity links when updating route/parameters in the menu tree.

Two ways to get around this:

- NOT LIKE('entity://%')
- Add a boolean field to menu links, no widget, and do the same logic on save.

Need to add description column (or otherwise handle description translation) on the link field, right now while it supports options/attributes there's no UI for them.

entity:// means we can completely decouple the data model work from the UI - i.e. the very worst case is you get a text field like now in the menu UI, and that's enough to make everything else work.

Overall that feels encouraging.

plach’s picture

FWIW I also think #15.3 is the most promising solution. @eff++

effulgentsia’s picture

Not sure if a child issue for #19 has been opened yet, so I opened one here: #2411143: Change LinkItem schema to store URIs rather than URLs/paths/routes. Feel free to close that as a dupe if it is.

webchick’s picture

Issue summary: View changes

Awesome, glad to see some movement towards consensus. Updating the issue summary based on my current understanding, but could definitely use review since I've changed quite a lot.

almaudoh’s picture

#15.3++
If this has been agreed on, I'd be happy to work on the entity stream wrapper.

catch’s picture

Issue summary: View changes
almaudoh’s picture

dawehner’s picture

@effulgentsia++
I really like the idea to decouple the data model from the UI.
As discussed with catch its not yet clear how to use that exactly for menu links, given that we still, at least in my thinking world, store route names in the tree.
But I'm confused we can figure out, how exactly we want to deal with it.

amateescu’s picture

Thanks everyone for keeping an open mind here!

I like @effulgentsia's proposal too, it's quite similar to #7 and only differs in two aspects:

  1. it loses the indirection of referencing a different object (the "cached_path" stuff) and with it the ability to have an optimized storage for the 10% path reference case on link fields and shortcuts, but given the sanity of having the same storage model and expectations everywhere, which was exactly the purpose of my proposal, I can live with that :)
  2. it folds the extra "target_entity_object" column/property into the URI property, thus requiring a query that will be a bit more expensive: NOT LIKE('entity://%') on the 'uri' column vs. IS NULL on the 'target_entity_object' column. I can't say if this will mean a lot in terms of performance so I'm not going to push it further than this comment.

Since this meta also touches the UI parts, here's my idea for the final widget design:

  • keep it as a single (autocomplete-like) textfield
  • when the user types something that starts with a '/' or the final string (probably copy-pasted) starts with 'http://', no autocompletion will be provided and just store what was typed - this is the path reference case
  • when the user types something that doesn't start with a '/', provide (D)ER autocompletion for a list of entity types configurable at the widget level
pwolanin’s picture

@almaudoh - I'm not sure this makes sense as a stream wrapper at all. Those are for files. This is just a scheme like base:// we are already using.

almaudoh’s picture

@pwolanin yeah. After I opened that issue and thought about how to write the patch, I figured it didn't need to be a streamwrapper. So then that means that issue may have to be rescoped.

webchick’s picture

Copied amateescu's suggestion about the UI in #28 to #2407913: Discuss/define the minimal UX for adding menu links to entities. Let's please keep the UI discussion bits over there so they don't get lost here in the meta discussion.

larowlan’s picture

Added another critical which I think this blocks

Wim Leers’s picture

webchick’s picture

#2411143: Change LinkItem schema to store URIs rather than URLs/paths/routes made it in, so we can now store entity://xxxx, but there's a follow-up at #2413029: Change LinkItem schema to also store a description that needs to happen before we can declare the schema complete.

webchick’s picture

We're now a little less than a week out from the menu/router criticals sprint in New Jersey, and here's where things currently sit:

Thanks so much for your work on this, everyone!

andypost’s picture

A good example of route name change that coused css issue #2413723: Toolbar icon for "People" item broken

webchick’s picture

pwolanin, effulgentsia, and I met today to lay out a rough gameplan for the sprint coming up _this_ week! (stupid snowmageddon permitting :D)

You can find it here: https://docs.google.com/a/acquia.com/document/d/1zNg3qDgWVjqqtpq41rRa8ly...

High-level goals, in order of priority:

  1. Finalize the data model for storing menu links.
  2. Convert everything to use the link field.
  3. Remove _url()/_l().
  4. MVP for menu link UI.
  5. Performance.
  6. Other misc. stuff.
xjm’s picture

Issue tags: +D8 Accelerate NJ
Wim Leers’s picture

Issue summary: View changes

Based on discussion with pwolanin, effulgentsia, xjm, Tim Plunkett, dawehner and mpdonadio, we decided to:

  1. use entity:, not entity://. Reasons:
    1. it's wrong to use // in the URI, because it requires an authority to be defined (and a path). The authority must contain a hostname. Omitting the double slash removes the need to specify an authority and hence hostname. We only want the path part; there is no sensible hostname that we can define; the Drupal site is the authority, it is the host, hence we only want a part.
      (See http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax for details.)
    2. Not only is it a violation of the spec for URIs and hence a theoretical error, it also has practical consequences: it prevents us from using parse_url().
  2. analogously introduce user-path:, not user-path://; the same reasons as above apply.
  3. analogously update base:// to base:; the same reasons as above apply. Changing this causes absolutely minimal disruption.
  4. not update public:// and private:// to remove the slashes, because PHP's stream wrappers must use double-slashed schemes: http://php.net/manual/en/wrappers.php. On top of that, it'd be much more disruptive too.

We also determined that we don't need a description property on LinkItem: see #2413029-16: Change LinkItem schema to also store a description.

xjm’s picture

dawehner’s picture

Added another subissue.

webchick’s picture

Day 1 of the sprint, here's where things are at (to my understanding as someone who was not physically there and also with a sick toddler all day, so YMMV ;))

AWESOME work, folks!! :D

YesCT’s picture

Issue summary: View changes
Issue tags: +blocker

listed two issues this blocks in the summary.

amateescu’s picture

Issue summary: View changes

One of them is not needed anymore.

xjm’s picture

webchick’s picture

Day 2, here's where things are at:

Can't wait to see the progress tomorrow. :D

webchick’s picture

Issue tags: -D8 upgrade path

Also speaking of upgrade path blockers, I think I can safely remove that tag from this issue; the only two remaining sub-issues that affect the upgrade path are:

#2416955: Convert MenuLinkContent to use a link widget
#2417423: Re-process the user-entered-paths for custom menu links when there is a menu rebuild

...and both of them already have the tag.

webchick’s picture

Day 3!

dawehner’s picture

webchick’s picture

Greetings from Day 4 of the fabulous DrupalCamp NJ "Critical Crusher" D8 Accelerate Sprint!

While most people are headed home tomorrow, there are a few stalwart hangers-on who are staying through to Tuesday so I may also have another update tomorrow.

webchick’s picture

So revisiting the list of issues post-sprint, I believe the following statement is accurate:

The only critical issues left directly related to menu links are #2418017: Implement autocomplete UI for the link widget and #1959806: Provide a generic 'entity_autocomplete' Form API element, upon which it depends.

(There are still critical issues in the replacement of _l()/_url() but those are related to the general menu API.)

Given that, I'd propose demoting this meta issue to a "major" one. I think it still has value in laying out the problem space, and in tracking various dependent issues, but I don't think getting every single one of these sub-issues done (apart from the two already marked critical) is required for us to ship D8.

Thoughts?

dawehner’s picture

Given that, I'd propose demoting this meta issue to a "major" one. I think it still has value in laying out the problem space, and in tracking various dependent issues, but I don't think getting every single one of these sub-issues done (apart from the two already marked critical) is required for us to ship D8.

I think we could postpone it once we have a minimal UI with autocompletion support, as this is the first time, the initial brittleness issue is completly tackled.
After that I think you are right, moving it to major and link to further improves is a good idea.`

webchick’s picture

Priority: Critical » Major
Issue tags: -blocker

Ok great. We're now down to #2418017: Implement autocomplete UI for the link widget as the last critical issue in this set, so I believe it's fine to move this back down to major and remove the blocker tag.

Thank you so much everyone for all of your work hashing out the plan, coding up the fixes, and working through all of the gnarly bits that those uncovered.

YesCT’s picture

maybe something from the recent menu work caused this: #2423153: Add menu from the editing page doesn't save the changes

webchick’s picture

For those who missed it, Peter did a great write-up about the sprint at https://groups.drupal.org/node/456353.

effulgentsia’s picture

During the NJ sprint, some of us discussed URL generation when paths are tokenized (such as in Views). I don't know if some other issue was made for that, but I didn't find one, so opened this one: #2426399: FieldPluginBase::renderAsLink() loses language prefix for tokenized paths. Not adding it as a child of this, since the issue title of this is "menu links", and that's a link in Views, but just commenting here to notify followers of this issue.

xjm’s picture

Issue summary: View changes
xjm’s picture

The CR in https://www.drupal.org/node/2417421 never got published, so I did that now.

However, it's a bit incomplete and some of the information is incorrect. E.g., user-path: a.k.a. internal: does not replace base:; it just serves a different usecase.

YesCT’s picture

Issue summary: View changes

is the only remaining task here to correct the change record?
or are we keeping this open for all the remaining open child issues? (are they all officially "children" or some of the related referenced by issues also?)
maybe we should explicitly list the ones this is open for in the summary?

xjm’s picture

I think the meta should stay open as there are numerous outstanding sub-issues, some of which are major. I think anything that's a child that's not postponed to 8.1.x is relevant still.

Added a few issues that were missing the parent as well.

effulgentsia’s picture

Title: [meta] Finalize the menu links system » [meta] Finalize the menu (and other user-entered) links system

The remaining child issues (and some of the original ones) cover more than just menu links, so retitling this meta. Leaving it in the "menu system" component, because I don't know where else to assign it.

effulgentsia’s picture

Title: [meta] Finalize the menu (and other user-entered) links system » [meta] Finalize the menu links (and other user-entered paths) system

More title tweaking.

stBorchert’s picture

What about URL aliases? The field to enter the existing path could also be an autocomplete ...
I'm the maintainer of MPAC and with adding autocomplete to the shortcut and menu link forms the module is nearly obsolete now ;)

stBorchert’s picture

@hass: uhm, I've seen these issues before, but how do they affect the form for URL aliases (PathFormBase)?

dawehner’s picture

@stBorchert
Interested idea.
#2430593: Store {url_alias}.source and .alias with a leading / is partially related but doesn't talk yet about the UI.

hass’s picture

These issues make MPAC obsolete I think. They are adding the autocomplete to the path fields what MPAC does, isn't it?

webchick’s picture

This issue could really use an updated issue summary based on the work that's left outstanding. We want to make sure anything that impacts the upgrade path is tagged as such it can be ideally prioritized before the critical D8 upgrade path issues get to zero.

jhedstrom’s picture

andypost’s picture

Wim Leers’s picture

Status: Active » Closed (fixed)

#60 said:

I think the meta should stay open as there are numerous outstanding sub-issues, some of which are major. I think anything that's a child that's not postponed to 8.1.x is relevant still.

8.0.0 has been out for almost two months now. We can't do any more "finalizing" work.

Does that mean we should close this? Most child issues have been fixed. I looked at the remaining ones, and closed a few more, unpostponed a few, bumped several to 8.1 and left a few that can be fixed without breaking BC open against 8.0.x.


Therefore I think it's fair to now close this.

We've got open issues for things we still want to/should do. This issue is linked from many other issues, so we can easily find back this issue to read our original thinking again.