Bug #86933
closed
$uid must be positive integer, 0 given when trying to edit multiple records in a workspace
Added by Tim Karliczek almost 6 years ago.
Updated over 4 years ago.
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.
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.
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.
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.
- Related to Bug #70226: Error when trying to edit several properties at once in List Modul in TYPO3 7.5 added
- Related to Bug #83994: $uid must be positive integer, 0 given when creating a new Page added
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF