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

Unable to move grid block #9962

Closed
AaronSadlerUK opened this issue Mar 10, 2021 · 9 comments · Fixed by #10086
Closed

Unable to move grid block #9962

AaronSadlerUK opened this issue Mar 10, 2021 · 9 comments · Fixed by #10086
Labels

Comments

@AaronSadlerUK
Copy link
Contributor

As seen on the forum here:
https://our.umbraco.com/packages/website-utilities/umf/bug-reports/104700-this-content-is-now-allowed-here-prevents-reordering, this breaks one of the main and fundamental reasons for using grid.

The post is for an earlier version, however it still exists in 8.10.2.+

It seems it is not possible to drag and drop grid blocks if allow all editors is enabled.

The workaround for now involves commenting out a line in a core file:

  /*if (area.$allowedEditors) {
      allowedEditors = (allowedEditors ?? []).concat(area.$allowedEditors.map(e => e.alias));
  }*/

src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js

@nul800sebastiaan
Copy link
Member

I don't know if that's the exact fix but it would be good to investigate what that if statement does and how it should be ammended. 👍

@umbrabot
Copy link

Hi @AaronSadlerUK,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post

Thanks muchly, from your friendly Umbraco GitHub bot :-)

@AaronSadlerUK
Copy link
Contributor Author

@nul800sebastiaan surely this is a core bug, given that one of the fundamental features of grid is the drag and drop?

@nul800sebastiaan
Copy link
Member

Hi @AaronSadlerUK, certainly it's a core bug. The way we work with incoming bug reports is usually: if we broke it recently then we fix it. If it's been broken for a long time then it seems not many people are running into the problem, we kindly ask for some help in getting it fixed.
While we would love to dive in an fix each and every bug on the issue tracker, that unfortunately doesn't scale, so we rely on the help of our community for some of this.

@AaronSadlerUK
Copy link
Contributor Author

I noticed 3 people last night having the same issue on Facebook, others as on the forum post are also running into this issue.
It might be that editors haven't reported it (we know that happens a lot).

Just concerned that this seems to have been around a while, and as such won't be picked up and fixed in a timely manner.
Unfortunately I don't know angular otherwise I would look into it.

Fingers crossed it gets fixed 🤞

@bjarnef
Copy link
Contributor

bjarnef commented Mar 22, 2021

I wonder if this may be related to #9825 which has PR #9887

The previous checklist-model https://vitalets.github.io/checklist-model/ worked a bit different, which auto-populated an array using checklist-value.

Actually I could only find this reference of checklist-model, so maybe something to consider to remove in v9 or in rebuild of backoffice UI: https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/checklistmodel.directive.js#L3-L6

@AaronSadlerUK
Copy link
Contributor Author

AaronSadlerUK commented Mar 23, 2021

The bodge in 8.10.2 is slightly different to above:

The following line needs commenting out (L18923 of umbraco.controller.js):

$scope.$apply(function () {
     area.dropNotAllowed = true;
});
ui.placeholder.hide();
cancelMove = true;

@AaronSadlerUK
Copy link
Contributor Author

Just to update, this issue also happens when editors are manually selected

@AaronSadlerUK AaronSadlerUK changed the title Unable to move grid block when allow all editors checked Unable to move grid block Mar 30, 2021
@patrickdemooij9
Copy link
Contributor

patrickdemooij9 commented Mar 30, 2021

Took a look at this today. The issue seems to be that .allow does not take the option "Allow all editors" into account. It's better to be using $allowedEditors because it combines the results based on .allow & .allowAll here: https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js#L848
PR: #10086

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

Successfully merging a pull request may close this issue.

5 participants