silverstripe-elemental: Draft changes to a page with a modified pagetype can stop blocks from displaying on the live site

DNA/Elemental 4.4.0 / SS/Framework 4.6.1

When edit a page and save (i.e. published and draft version of page are different). Elemental block is published.

When we visit the page, logged in, all shows perfectly On logged out browser, ALL elemental blocks go missing.

I think it relates to this: https://github.com/dnadesign/silverstripe-elemental/blob/4/src/Models/ElementalArea.php#L236

because when I change DRAFT to LIVE on that line, it works fine.

I had a comparison of the SiteTree, Page and ElementalArea table for Draft and Live.

There is one thing that is not right. The ElementalArea.OwnerClassName does not match the class name of the page (it is Page but it should be MyPage) in both ElementalArea and ElementalArea_Live.

I have tried to save and publish (with changes) the page a few times, but that does not make a difference. Also adding elemental blocks does not matter.

When I duplicate the page, the error does not occur, and so the duplicated page works as expected and in the OwnerClassName field says MyPage, not Page.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (14 by maintainers)

Most upvoted comments

Our govt client using CWP is also affected by this problem.

@dnsl48 I can reproduce in one specific site of mine, even if I downgrade to elemental 4.3.0. Other devs in house have tried and couldn’t reproduce. I’ve also tried in a few other local sites and couldn’t reproduce. Some suggested that this could possibly be related to incompatibility with another module (elemental module perhaps), but I’d need to check further to see which one could be causing the issue. For the site I’m having issues these are the modules.

"require": {
        "benmanu/silverstripe-styleguide": "0.1.x",
        "silverstripe/recipe-cms": "^4.4",
        "silverstripe/fulltextsearch": "dev-fix/queuedreindex",
        "silverstripe/recipe-authoring-tools": "^1.2",
        "silverstripe/recipe-collaboration": "^1.2",
        "silverstripe/recipe-reporting-tools": "^1.2",
        "silverstripe/recipe-blog": "^1.1",
        "silverstripe/recipe-form-building": "^1.2",
        "silverstripe/recipe-content-blocks": "^2.2",
        "silverstripe/redirectedurls": "2.x",
        "wilr/silverstripe-googlesitemaps": "^2.1",
        "dnadesign/silverstripe-elemental-list": "dev-master",
        "unclecheese/display-logic": "^2.0",
        "jonom/silverstripe-betternavigator": "4.x",
        "sheadawson/silverstripe-linkable": "2.0.x",
        "symbiote/silverstripe-multivaluefield": "5.0.x",
        "stevie-mayhew/silverstripe-svg": "2.1.0",
        "symbiote/silverstripe-addressable": "4.0.x-dev",
        "heyday/silverstripe-responsive-images": "^2.0",
        "silverstripe/securityreport": "2.x",
        "bummzack/sortablefile": "2.*",
        "jonom/focuspoint": "^3.1",
        "maxmind-db/reader": "~1.0",
        "hubertusanton/silverstripe-seo": "dev-master",
        "sinergi/browser-detector": "^6.1.2",
        "dnadesign/silverstripe-responsiveimageset": "dev-master",
        "dnadesign/silverstripe-elemental-virtual": "1.x-dev",
        "fullscreeninteractive/silverstripe-dropdownimagefield": "1.x-dev",
        "tractorcow/silverstripe-autocomplete": "4.x-dev",
        "silverstripe/crontask": "^2.1",
        "silverstripe/dynamodb": "^4.0",
        "wilr/silverstripe-tasker": "dev-master",
        "symbiote/silverstripe-advancedworkflow": "^5.2",
        "dnadesign/silverstripe-elemental-responsivetable": "1.0",
        "dorsetdigital/silverstripe-simpleinstagram": "^1.0",
        "dnadesign/silverstripe-signature": "^2.0",
        "silverstripe/raygun": "^3.2",
        "heyday/silverstripe-colorpalette": "^2.0",
        "ryanpotter/silverstripe-color-field": "^1.0",
        "dnadesign/silverstripe-elemental-media": "^0.12.0",
        "silverware/validator": "^1.2",
        "dnadesign/silverstripe-elemental-spotlights": "0.9.0"
}

I have tried 4.x.dev and the issue isn’t present when using that branch.

@dnsl48 your step 6 should be “edit a field on the page itself and save it as draft”, so the difference would be you don’t touch any of the published blocks, but the page.

Also experiencing this issue