Bug #86933
closed$uid must be positive integer, 0 given when trying to edit multiple records in a workspace
100%
Description
Uncaught TYPO3 Exception
#1437656456: $uid must be positive integer, 0 given
Example:
- Switch to one of your workspaces
- Go to the list Module (make sure there are some records that are not published/have changed compared to the live workspace)
- Show only records from one table (e.g. sys_category)
- Click the button to edit multiple records at once -> now the exception is thrown
I did some debugging on this one:
Usually typo3/sysext/recordlist/Resources/Public/JavaScript/Recordlist.js should get some entityIdentifiers from the data-uid-attributes in the rendered HTML.
But it seems that there are no data-uid_-attributes present if the record is not already published in the live workspace. Not sure why this happens yet.
The exception is thrown for other record types as well. So it does not in particular effect the sys_category records due to it happens for other records as well.
I reproduced this exception on a clean installed Typo3 8.7.20 with the official Introduction Package.
Just enable the EXT:workspaces, create workspace record and run the example above to reproduce this exception.
There are other issues with the same exeption (e.g. #70226 or #83994). But in none of them workspaces are mentioned, so i decided to open this issue.
Updated by Tim Karliczek about 6 years ago
One important thing to add:
If there is at least one record in the list that is already published and identically to the live version you will not get this exception because there is one uid in entityIdentifiers.
Please notice if you have a mix of published records without any changes and some new element (or at least with new changes compared to the live version) you will still not get the exception. But you will only be able to edit the records that do not have any unblished changes. The other records are missing in the "edit multiple records"-section.
In conclusion: The exception is only thrown when entityIdentifiers is empty.
Updated by Joerg Kummer about 6 years ago
I can confirm this behavior in version 8.7.21-dev.
In version 9.5.2-dev, new created entries in workspace don't get listed and is therefor not to reproduce.
Updated by Riccardo De Contardi over 5 years ago
This issue is still present on 10.0.0-dev (latest master)
Steps to reproduce¶
1) Have a "draft" workspace
2) Live > create a new page
3) Live > create two content elements in the page (e.g. a couple of Headline elements)
4) Switch to "draft" workspace
5) edit the two elements
6) List view > click on Page Content (2) and set a couple of fleds
7) Click on the "edit all records" button
Result:¶
an exception is thrown:
(1/1) #1437656456 InvalidArgumentException $uid must be positive integer, 0 given
I can confirm that it happens if all the records are changed in workspace; if one is identical to its LIVE version, the error does not occurr.
Updated by Georg Ringer over 4 years ago
- Related to Bug #70226: Error when trying to edit several properties at once in List Modul in TYPO3 7.5 added
Updated by Georg Ringer over 4 years ago
- Related to Bug #83994: $uid must be positive integer, 0 given when creating a new Page added
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/+/63943
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/+/63903
Updated by Georg Ringer over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e5ef53b374af9691b93fa476f37ffe384eed2c6b.