Project

General

Profile

Actions

Bug #86664

closed

Slug isn't fully adopted after updating via update button

Added by Oliver Bartsch over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2018-10-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

Current behaviour:
After updating the slug field in the page properties via the update button the new value isn't fully adopted.

Steps to reproduce:
  1. Create a page
  2. Rename the page
  3. Update the slug field via the update button
  4. Click the button to input a slug manually
  5. Change the slug manually
  6. Click the button for manually slug input again

Would expect:
After updating the slug the new value should be also in the field when clicking the “manual slug” and after the manually change the value should be this and not the value from updating.


Files

slug-update.mp4 (882 KB) slug-update.mp4 Oliver Bartsch, 2018-10-15 20:48

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #87122: FormEngine field type "slug": Edit after Recalculation shows wrong valueClosed2018-12-11

Actions
Actions #1

Updated by Oliver Bartsch over 5 years ago

  • Description updated (diff)
Actions #2

Updated by Stephan Großberndt over 5 years ago

  • Subject changed from Slug isn't fully adpoted after updating via update button to Slug isn't fully adopted after updating via update button
  • Description updated (diff)
Actions #3

Updated by Susanne Moog over 5 years ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Oliver Bartsch over 5 years ago

  • Related to Bug #87122: FormEngine field type "slug": Edit after Recalculation shows wrong value added
Actions #5

Updated by Josef Glatz over 5 years ago

  • Category changed from Link Handling, Site Handling & Routing to FormEngine aka TCEforms
  • Priority changed from Should have to Must have
Actions #6

Updated by Oliver Bartsch over 4 years ago

Oliver Bartsch wrote:

Current behaviour:
After updating the slug field in the page properties via the update button the new value isn't fully adopted.

Steps to reproduce:
  1. Create a page
  2. Rename the page
  3. Update the slug field via the update button
  4. Click the button to input a slug manually
  5. Change the slug manually
  6. Click the button for manually slug input again

Would expect:
After updating the slug the new value should be also in the field when clicking the “manual slug” and after the manually change the value should be this and not the value from updating.

While investigating in more detail, it gets clear that this isn't only a visual bug rather than a functional one.
Because not only the value of the readOnlyField isn't changed, the manually changed slug doesn't get written into the hidden input field at all.
Thats why the record still contains the old slug after saving.

Given a site with the current slug `/home`.
Following output is generated when running these console commands after different steps:

console.log('Input field: ' + $(".t3js-form-field-slug-input").val());
console.log('ReadOnly field: ' + $(".t3js-form-field-slug-readonly").val());
console.log('Hidden field: ' + $(".t3js-form-field-slug-hidden").val());

1. Open the record:

// Input field: /home
// ReadOnly field: /home
// Hidden field: /home

2. Click the toggle URL button:

// Input field: /home
// ReadOnly field: /home
// Hidden field: /home

3. Change the slug segment to `/home-test`:

// Input field: /home-test
// ReadOnly field: /home
// Hidden field: /home-test

4. Click the toggle URL button again:

// Input field: /home-test
// ReadOnly field: /home
// Hidden field: /home

If one save the record after step 3, the new slug will get written into database.
But if one click on the toggle button (step 4) again the hidden field which is responsible for the update is changed to the old value and the manually changed slug won't get written into database.

Actions #7

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61482

Actions #8

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61482

Actions #9

Updated by Oliver Bartsch over 4 years ago

Furthermore while testing the new Bugfix, I found another misbehavior.

If one updates the slug via the "slug-recreate" recreate button, the recreated slug is written into the hidden and the read only field But not into the input field. As a result, if one clicks the toggle URL button after recreating the slug, the input field with the old slug shows up instead of the recreated one.

Actions #10

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61482

Actions #11

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61514

Actions #12

Updated by Oliver Bartsch over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF