Comments (19)
@NightJar:
Brief rundown of the steps to upgrade:
I did follow the upgrade guide converting an old project, using mainly the single standard steps of uprgade-code. As the project was a bit messy I had to include some manual cleanup of composer requirements etc., including adding the removing old widgets module and adding the requirement to composer.json. But nothing directly database-related.
Unfortunately I did notice the issue quite late when reworking my templates, so there could have been some editing etc. in the meantime.
Especially I didn’t touch the Widgets manually - the state mentioned in my previous post was the result of the normal upgrade and dev/build command.
Also it was the same for all pages, even some quite sure I didn’t touch.
(I’m curious if the issue is a bug inside the widgets module at all or rather in the Core).
More results from yesterday:
- Simple republishing of pages didn’t solve the issue
- Found then that the Version field of all WidgetArea records was set to 0
So this is how I could solve it for me finally:
- Setting all WidgetArea/Version fields to 1 by SQL
- call publishRecursive() on all staged WidgetArea records (maybe republishing the pages would have worked now)
from silverstripe-widgets.
Is there any way to temporary fix it? i cannot publish the page having custom widgets anymore :(
from silverstripe-widgets.
Was having exact same issue i.e widgets (within blog) only showing with .../?stage=Stage, for me updating blog module fixed this, was using "silverstripe/blog": "^3.0@dev" - updated to "silverstripe/blog": "dev-master" and widgets now show properly.
Hmmmn. I'm trying to understand why that would fix the issue and I can't figure out why... I agree with @NightJar that it seems like something that Versioned should be able to do on dev/build - When you add Versioned to some DataObject then it should create published versions of all the records. I'll do some more investigation and raise an issue on silverstripe-versioned
.
from silverstripe-widgets.
This is exactly the problem I am facing for all our widgets.
from silverstripe-widgets.
Thanks. I’ve raised the impact level.
from silverstripe-widgets.
We've got a call in with one of your account managers over this, its blocking our migration... Just to close the loop if they ask you :-)
from silverstripe-widgets.
I have the same issue. Some insights:
- The Widgets themselves are published correctly (records in Widget_Live etc.)
- but the WidgetArea of the page not published, Table WidgetArea_Live is empty.
- Creating a new page works including adding of widgets, WidgetArea is published.
So it probably looks like a migration issue with the has_one relation to the WidgetArea.
from silverstripe-widgets.
- but the WidgetArea of the page not published, Table WidgetArea_Live is empty.
Hi @muppsy007 - can you please confirm this case with your custom widget; is it the only widget on the page?
but I can't find it when comparing to the Readme example.
@muppsy007 Could you also please indicate whether you mean the Readme on this module, or perhaps one of the guides on migrations, etc?
from silverstripe-widgets.
@muppsy007
@rvowles
@martinheise
You have all mentioned or alluded to this issue arising out of a recent upgrade to SilverStripe 4.
Can you please give a brief rundown of the steps you've taken to upgrade this module?
@martinheise in particular you have made mention that all the widgets have published, could you please specify if you did this manually (whether via a build task or SQL query) or the system did it automatically for you on dev/build
after upgrading?
@muppsy007 The steps you have described about signing in and out of the CMS simply change the viewing mode (as does ?stage=Stage
) - this indicates to me that things are simply not published. @martinheise has confirmed my suspicions with his added info. Pre-SS4 neither Widget
nor WidgetArea
were Versioned
- meaning that edits were instantly live. Now they are both Versioned
, and ownership ($owns
) is set up correctly. As a work around (or a fix, if you don't have too many pages with widgets) simply publishing the page should solve the issue for you in the meantime.
We would like to improve the migration experience however and address this on upgrade - as everything was 'always live' before there should be no issue in publishing both Widgets and WidgetAreas (however publishing pages automatically is dangerous as draft content generally should not be considered as OK to be live at the time of upgrade).
This may be as simple as making appropriate notes in the Readme - so it would be very helpful if you could all please provide feedback about your upgrade steps and experience :)
from silverstripe-widgets.
from silverstripe-widgets.
Thanks @rvowles
Can you please tell me if you are using this module in conjunction with silverstripe/blog
, or stand-alone on a custom Page type?
And how is it that your automated migration runs?
from silverstripe-widgets.
from silverstripe-widgets.
Thank you @rvowles
Sorry could you please also advise me whether the Widgets themselves are published or unpublished after running the dev/build
?
I'm having trouble tracking down what could be performing this action. There does not appear to be any build task or migration script associated anywhere in silverstripe/widgets
.
from silverstripe-widgets.
from silverstripe-widgets.
Interesting, thank you for the feedback @martinheise
While I certainly think it is possible to create a build task in this module to run after a code upgrade is complete in order to set the versioning to a correct state to begin with, I feel like there should be a feature for this in the core (possibly silverstripe/versioned
) that allows for this kind of action as surely this isn't the only module affected.
It sounds like any object that was not versioned that becomes versioned will have issues adapting to that change. I think it would be cool if some of the core team could weigh in on this issue and give their thoughts - @robbieaverill @tractorcow @dhensby perhaps, as I know these people have dealt with versioning before.
My proposed solution would be to introduce a hook for e.g. Versioned that would run on a dev/build
(akin to requireDefaultRecords
) that would detect the absence of any versions in the ${DataObjectTable}_Versioned
table, and automatically publish (recursively) the first version. This I think would be safe as previously to becoming versioned any update was instantly 'live', in a similar fashion to thinking of it as "permanently published".
from silverstripe-widgets.
Was having exact same issue i.e widgets (within blog) only showing with .../?stage=Stage, for me updating blog module fixed this, was using "silverstripe/blog": "^3.0@dev" - updated to "silverstripe/blog": "dev-master" and widgets now show properly.
from silverstripe-widgets.
I'll do some more investigation and raise an issue on silverstripe-versioned.
Did this happen? I think we can move this to a versioned issue, I don't think it should be fixed here
from silverstripe-widgets.
I haven't raised an issue but I do think it's a generic "adding versioned to something should create a published version of all those things". Something that should live on Versioned. I'll try to get around to putting some time to put my thoughts together in an issue today.
from silverstripe-widgets.
Ok I've raised an issue... A few days after I said I'd try too
silverstripe/silverstripe-versioned#215
I'll close this in favour of that. Thanks all for the discussion!
from silverstripe-widgets.
Related Issues (20)
- Method 'getRequest' does not exist on 'SilverStripe\Forms\Form' HOT 4
- ENHANCEMENT Apply Versioned extension to Widget model (v4 only) HOT 3
- Fails to load compass HOT 9
- Widgets syncronize? HOT 2
- SS4 WidgetAreaEditor missing namespace HOT 2
- 500 fatal error when trying to add a widget to a page HOT 1
- Check and update module for SS4 compatibility where necessary HOT 1
- Rename HTML Content widget HOT 9
- Widget UX: Widgets appear on incompatible page types HOT 1
- Can't install for SS2.3 and blog2.5 HOT 1
- WidgetAreaID SQL error when adding WidgetArea to a child of Page HOT 7
- control tag is not working HOT 2
- DOCS README needs updating HOT 4
- [Warning] Invalid argument supplied for foreach() on 1.3 release running on SS 3.* HOT 2
- Split screen editing of widgets on a blog page shows TinyMCE too narrow HOT 5
- ListboxField not showing selected values HOT 8
- SS 4.5.1 Duplicate lits of 'Available Widgets' in Silverstripe backened. HOT 2
- Getting Widgets of Another Top Pages(This is Wrong) HOT 1
- Duplicating a page with Widgets doesn't assign new SideBarID HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from silverstripe-widgets.