Split off from #1751210: Convert URL alias form element into a field and field widget

Examples of how this would be useful:

- you don't want French content to have an en/ prefix nor the contributor bother to prefix it with fr/
- you want contributors to customize 'news' url, but it must begin with year/month/day/
- you want contributors to fully customize url of 'article' content (in this case specify an empty prefix for 'article' node type)

Proposed solution

  1. Separate field instance settings for non-customizable URL alias prefix and user-customizable URL alias part/suffix:

  2. Node add/edit form only allows user to customize the user-customizable URL alias part:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaele’s picture

OK, one more time. Posted by @sun here: http://drupal.org/node/229568#comment-6684692

  1. Add the field to any entity:
    pathauto-36-manage-fields.png

  2. Edit the path field settings:
    pathauto-36-field-settings.png

  3. Later: Enable automatic aliases:
    pathauto-36-field-settings-auto.png

  4. Add or edit an alias-field-enabled entity:
    pathauto-36-entity-add-edit.png

gaele’s picture

@sun, why do you have two separate steps 2 and 3? I'd imagine something like this:

2. Enable automatic aliases (tokens allowed in both "prefix" and "suffix"):

step2 and 3 combined

3. Add or edit an alias-field-enabled entity:

Add or edit alias

sun’s picture

Assigned: Unassigned » sun
Priority: Normal » Major
Issue tags: +Usability, +Killer End-User Features, +Platform Initiative

re: #2:
These were only separate screenshots to clarify that the new prefix does not depend on the Pathauto/Token functionality at all. In other words:

The separation into non-customizable and customizable part even makes sense without any automatically generated values.

The most simple use-case is a content type "News", and you just simply want all news nodes to share the URL alias prefix "news/" — that's a static value and does involve any tokens at all.

gaele’s picture

OK, cool.

If so, in #1 step 3 why would you want to change the prefix that was set in step 2? What's the use case?

klonos’s picture

Just to get things clear: this is postponed on #1751210: Convert URL alias form element into a field and field widget. Right? And this is bound to the D8 feature freeze (December 1st, 1-2 days time). Right?

Having this in would make things so easy/simple. Please do your best people. Thanx in advance.

renat’s picture

@klonos, @Dries extended Feature Freeze date until February 18, 2013 for features, that shown substantial progress yet. Hope this feature will be considered eligible, as far as much work was done in http://drupal.org/node/1751210.

klonos’s picture

@renat: yes, I just saw a reply from Angie in an issue with a link to Dries' announcement. That's great!! (...though I think that most of us following the core issues must have seen it coming).

sun’s picture

Issue summary: View changes

Updated issue summary.

sun’s picture

Status: Postponed » Needs review
FileSize
48.7 KB

Just to clarify that there is very sophisticated and working code for this issue already.

The changes were merely removed from the parent issue in order to achieve faster progress there.

  1. Manually merged path-field branch changes.
  2. Removed NullWidget, which was supposed for automatic alias support only.
nod_’s picture

Status: Needs review » Needs work

The last submitted patch, path.prefix.8.patch, failed testing.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.

jibran’s picture

Re-tagging.

klonos’s picture

I would love it so bad if this feature gets in D8! ...or at least 8.1.0

andypost’s picture

Parent issue: » #229568: Pathauto in Core
dawehner’s picture

Version: 8.0.x-dev » 8.1.x-dev
Assigned: sun » Unassigned

Yeah this is certainly topic for a future release now.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs work » Closed (duplicate)

Closing as duplicate as I think effort should go into getting #229568: Pathauto in Core into core. Then that should cover this scenario too.

If anyone disagrees please reopen explaining why

Thanks!