Project

General

Profile

Actions

Bug #24952

closed

javascript error after contextmenu -> delete a page

Added by Sven Juergens over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2011-02-04
Due date:
% Done:

0%

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

Description

hi,

in 4.5.0 and in current trunk 10380 i got a javascript error after deleting a page with the Contextmenu -> Page Actions -> delete.
the page is deleted but the pagetree is not refreshed

Javascript error:
callback is not a function
http://.../typo3temp/compressor/actions-f756273f7000ff92724921512a563fd3.js?1296751735

Line 147

by the way, there is a missing confirm Message for deleting pages
(issue imported from #M17479)


Files

17479_v1.diff (536 Bytes) 17479_v1.diff Administrator Admin, 2011-02-21 23:47
Actions #1

Updated by Steffen Gebert over 13 years ago

Stefan, can you reproduce this? I can't.

Actions #2

Updated by Sven Juergens over 13 years ago

hi,

i spend some time to this issue.
The first thing is the pagetree is not refreshed.
This can reproduced if you use the "options.alertPopups" for disabling the confirm message, it's a UserTSConfig or you use this javascript "trick" and type in your firebug console
TYPO3.Components.PageTree.Configuration.displayDeleteConfirmation = 0
than delete a page with the contextMenu, there is no pagetree refreshing.

for the javscript error output you need firebug version 1.7 alpha, you can get it on http://getfirebug.com/downloads, sorry maybe the alpha version of firebug is the reason for the error but maybe only this firebug version shows the error

Actions #3

Updated by Steffen Gebert over 13 years ago

Thanks, Sven! That's the missing piece!

Setting options.alertPopups = 2 or disabling via JS leads to the error, as the callback seems not to be assigned.
actions.js::deleteNode()

Maybe the check

 if (callback !== null)
should be
if (typeof callback !== 'undefined')
?
As callback is undefined.. (or a combination of both..)

Actions #4

Updated by Stefan Galinski about 13 years ago

The attached patch fixes the javascript. All other mentioned errors are invalid like non-refreshing pagetree (happens thru the error) and no confirm message is shown.

Actions #5

Updated by Stefan Galinski about 13 years ago

Committed in:
rev 10569 (trunk)
rev 10570 (4.5)

Actions

Also available in: Atom PDF