-
Notifications
You must be signed in to change notification settings - Fork 55
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
Duplicating a page with Widgets doesn't assign new SideBarID #190
Comments
Is this all pages or just child pages? It looks like from the Page extension that maybe there could be a problem if InheritSideBar is true... (which is default) and the page is a child page... I can't really see immediately why this would happen on parent pages, though... edit: It definitely looks like this feature could use some test coverage ;) |
Yeah, this is happening on all pages, I tried both top level pages and child pages. Unchecking "Inherit Sidebar From Parent" doesn't change the result. Stepping through the silverstripe-widgets/src/Extensions/WidgetPageExtension.php Lines 69 to 85 in 5aca443
The values being assigned were all correct and new records were being created. Even the
|
This was supposedly fixed before in #58 and I think #188 might also be referencing this issue.
Expected Behavior
Duplicating a page should also duplicate the
WidgetArea
andWidgets
in it, and the resulting new page be assigned aSideBarID
corresponding to the duplicatedWidgetArea
.Actual Behavior
Duplicating a page does create copies of the original
WidgetArea
andWidgets
but the resulting page'sSideBarID
still points to the original page'sWidgetArea
.Steps to Reproduce the Problem
composer create-project silverstripe/installer <project-name>
composer require silverstripe/widgets silverstripe/blog
Widget
andWidgetArea
have been duplicated, but the duplicated page still has the original page'sSideBarID
.Specifications
The text was updated successfully, but these errors were encountered: