Bug #86664
closedSlug isn't fully adopted after updating via update button
100%
Description
Current behaviour:
After updating the slug field in the page properties via the update button the new value isn't fully adopted.
- Create a page
- Rename the page
- Update the slug field via the update button
- Click the button to input a slug manually
- Change the slug manually
- 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
Updated by Stephan Großberndt about 6 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)
Updated by Susanne Moog about 6 years ago
- Sprint Focus set to On Location Sprint
Updated by Oliver Bartsch almost 6 years ago
- Related to Bug #87122: FormEngine field type "slug": Edit after Recalculation shows wrong value added
Updated by Josef Glatz almost 6 years ago
- Category changed from Site Handling, Site Sets & Routing to FormEngine aka TCEforms
- Priority changed from Should have to Must have
Updated by Oliver Bartsch over 5 years ago
Oliver Bartsch wrote:
Current behaviour:
Steps to reproduce:
After updating the slug field in the page properties via the update button the new value isn't fully adopted.
- Create a page
- Rename the page
- Update the slug field via the update button
- Click the button to input a slug manually
- Change the slug manually
- 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.
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Oliver Bartsch over 5 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.
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Oliver Bartsch over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6936c06d8d653ab3d77e025ce606d224568324cb.
Updated by Benni Mack almost 5 years ago
- Status changed from Resolved to Closed