Bug #30229

Error when deleting a Page with translation

Added by Maik Nergert over 1 year ago. Updated about 1 month ago.

Status:Needs Feedback Start date:2011-09-23
Priority:Won't have this time Due date:
Assignee:- % Done:

0%

Category:Pagetree
Target version:4.5.18
TYPO3 Version:4.5 Complexity:
PHP Version:5.2
Votes: 1 (View)

Description

Hi,

everytime a user deletes pages with translated content on it, you get the following error message:
4.4.11:

1: Attempt to delete record without delete-permissions. [ERROR: Record could not be fetched.]

4.5.6/4.6.0:
Exception
[1.3.-1]: Attempt to delete record without delete-permissions. [ERROR: Record could not be fetched.]

It's only a message, the page+content will be deleted and disappear in the page tree. Each translation produces 1 message.

I have reproduced the error on different typo3 versions. 4.4.11 (fresh installation,windows), 4.5.6 (existing installation,linux), 4.5.6 (fresh installation,linux), 4.6.0beta3 (fresh installation,windows).

How to reproduce?
- take a fresh or existing typo3 installation
- setup your site to allow localization
- create a testuser with all access rights (exept admin)
- create a new page and add some sample content + alternative page language
- use the 'localize to' button in the list view to translate the sample content
- grant the testuser ownership of the new page
- switch to testuser and delete the newly created page

At this point, you should see the error message and a record in the log.
The message doesn't appear when working as admin.

Regards
Maik

patch-30229.diff (507 Bytes) Claudio Mettler, 2012-07-24 14:56

History

Updated by René Häfliger over 1 year ago

  • Target version set to 4.5.9

Same issue here.
Tested in Version 4.5.3 and 4.5.8 (php 5.3) ...

As I have seen in the file t3lib/class.t3lib_userauthgroup.php ond line 608 the record (translated tt_content) should be fetched for checking access permissions, but is already deleted...

I'm wondering why this is no bigger issue. Hope it's not kind of misconfiguration..

Updated by Ernesto Baschny over 1 year ago

  • Target version changed from 4.5.9 to 4.5.12

Updated by Claudio Mettler 10 months ago

attached is a patch against 4.5.17 that fixes the problem. i am not sure if the patch format is right.

Updated by Maik Nergert 10 months ago

Thanks Claudio, this patch works for me.

Updated by Gerrit Code Review 9 months ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/14265

Updated by Benjamin Mack 3 months ago

  • Status changed from Under Review to Needs Feedback

Claudio Mettler wrote:

attached is a patch against 4.5.17 that fixes the problem. i am not sure if the patch format is right.

Hey Claudio,

I actually tried the same behaviour but cannot reproduce this error message.

This is what I have:

  • 4.5.23-dev running
  • I create a page in the default language, I create a content element on it
  • I create a translation of the page, and then I translate the content element

The log shows this

06:08:47 admin@LIVE DB Delete
Record 'Testpage' (pages:73) was deleted from page 'Home' (1)
Record 'Testpage DA' (pages_language_overlay:2) was deleted from page 'Testpage' (73)
Record '[Translate to Dansk:] Text+Images EN' (tt_content:254) was deleted from page 'Testpage' (73)
Record 'Text+Images EN' (tt_content:253) was deleted from page 'Testpage' (73)
Record '[Translate to Dansk:] Text+Images EN' (tt_content:254) was deleted from page 'Testpage' (73)

Everything fine then, right? Also: Does this issue happen to you on newer installations (4.6+) as well?

Updated by Maik Nergert 3 months ago

Hi Benjamin,

did you try to delete the page as non-admin?

Updated by Ralf Merz about 1 month ago

Hi,

i can confirm that this bug still exists in TYPO3 6.0.2. As an non-admin, but an editor having localization rights, i have the following behavior:
- a page has been created an a content element "text w. image" has been created and localized
- in the pagetree i choose to copy the page and insert it after an existing page
Until now... no problems.
- Now i choose the click menu to delete the page.
=> the error message as described in the issue appears:
Exception
[1.3.-1]: Attempt to delete record without delete-permissions. [ERROR: Record could not be fetched.] [1.3.-1]: Attempt to delete record without delete-permissions. [ERROR: Record could not be fetched.]

The page tree does not refresh by itself. But if i do refresh I can see that the deleted page is no longer in the page tree, and i also can not open it in frontend. In the database the "deleted" flag is set.

Hope that helps to fix this.

Kind regards
Ralf

Also available in: Atom PDF