Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and Drop Data Object into Empty Folder Raises Exception #752

Closed
cancan101 opened this issue Nov 15, 2024 · 2 comments
Closed

Drag and Drop Data Object into Empty Folder Raises Exception #752

cancan101 opened this issue Nov 15, 2024 · 2 comments

Comments

@cancan101
Copy link
Contributor

If you drag and drop a Data Object (using tree view) into an empty folder:

Uncaught TypeError: Cannot read properties of undefined (reading 'canSortManually')
    at klass.onTreeNodeBeforeMove

from:

         // dropping objects not allowed if the tree/folder is paginated and sort by index (manual indexes) is enabled
         if(((!newParent.pagingData.canSortManually) || (newParent.childNodes.length > pimcore.settings['object_tree_paging_limit'])) && (newParent.data.sortBy == "index")){
             pimcore.helpers.showNotification(t("error"), t("element_cannot_be_moved_because_target_is_paginated"), "error");
             return false;
         }
@fashxp
Copy link
Member

fashxp commented Nov 15, 2024

already fixed with #723

@fashxp fashxp closed this as completed Nov 15, 2024
@lorextera
Copy link

I think something still broken even in the new code, because "newParent.pagingData" is undefined for the empty folder.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants