Project

General

Profile

Actions

Bug #86933

closed

$uid must be positive integer, 0 given when trying to edit multiple records in a workspace

Added by Tim Karliczek over 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2018-11-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description


Uncaught TYPO3 Exception
#1437656456: $uid must be positive integer, 0 given
Example:
  1. Switch to one of your workspaces
  2. Go to the list Module (make sure there are some records that are not published/have changed compared to the live workspace)
  3. Show only records from one table (e.g. sys_category)
  4. 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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #70226: Error when trying to edit several properties at once in List Modul in TYPO3 7.5Closed2015-09-30

Actions
Related to TYPO3 Core - Bug #83994: $uid must be positive integer, 0 given when creating a new PageClosed2018-02-21

Actions
Actions #1

Updated by Tim Karliczek over 5 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.

Actions #2

Updated by Joerg Kummer over 5 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.

Actions #3

Updated by Riccardo De Contardi about 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.

Actions #4

Updated by Georg Ringer about 4 years ago

  • Related to Bug #70226: Error when trying to edit several properties at once in List Modul in TYPO3 7.5 added
Actions #5

Updated by Georg Ringer about 4 years ago

  • Related to Bug #83994: $uid must be positive integer, 0 given when creating a new Page added
Actions #6

Updated by Gerrit Code Review about 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

Actions #7

Updated by Gerrit Code Review about 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

Actions #8

Updated by Georg Ringer about 4 years ago

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

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF