Skip to content

Fix structure internal flag and add webspace validate command #3639

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

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Nov 21, 2017

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
License MIT
Documentation  sulu/sulu-docs#364

What's in this PR?

Fix structure internal flag as it is readed as boolean not string.

Also add better error message when structure metadata could not be found.

Also a command to validate the webspaces was added. It checks if the xml exists, view exists and controller exists.

Why?

Currently the excerpt.xml and other internal structure the internal flag is not correctly read and is false instead of true.

Currently error message was Calling getProperties() on null.

There was currently no way to validate the webspace configuration is ok.

Example Usage

Exception: Change default template of webspace to a none exist and run sulu:build dev.
Command: bin/adminconsole sulu:content:validate:webspaces:

Output:

bildschirmfoto 2018-02-23 um 20 01 06

BC Breaks/Deprecations

Describe BC breaks/deprecations here. (remove this section if not needed)

To Do

  • Create a documentation PR

@alexander-schranz alexander-schranz force-pushed the enhancement/invalid-structure-exceptions branch 2 times, most recently from 14178ec to 634e05e Compare November 21, 2017 17:47
@alexander-schranz alexander-schranz changed the title Show better exception when invalid structure is given Add validate webspace command Nov 21, 2017
@alexander-schranz alexander-schranz force-pushed the enhancement/invalid-structure-exceptions branch 3 times, most recently from 2c928a8 to 55e069b Compare November 21, 2017 17:56
@alexander-schranz alexander-schranz force-pushed the enhancement/invalid-structure-exceptions branch 3 times, most recently from 2e8b7b0 to 499aa5f Compare February 23, 2018 18:52
@alexander-schranz alexander-schranz changed the title Add validate webspace command Fix structure internal flag and add webspace validate command Feb 23, 2018
@alexander-schranz alexander-schranz changed the base branch from master to release/1.5 February 23, 2018 18:52
@@ -36,7 +36,7 @@ public function load($resource, $type = 'page')
$structure->name = $data['key'];
$structure->cacheLifetime = $data['cacheLifetime'];
$structure->controller = $data['controller'];
$structure->internal = 'true' === $data['internal'];
$structure->internal = $data['internal'];
Copy link
Member Author

@alexander-schranz alexander-schranz Feb 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a boolean and seems always set to false currently.

@alexander-schranz alexander-schranz force-pushed the enhancement/invalid-structure-exceptions branch from 499aa5f to 4d73ae3 Compare February 23, 2018 19:10
@alexander-schranz
Copy link
Member Author

Backported the PR to 1.5 as I found a bug when building this feature (Internal Flag for Structure Metadata is never set to true)

@alexander-schranz alexander-schranz force-pushed the enhancement/invalid-structure-exceptions branch 2 times, most recently from 628b5c3 to 5f8f4c3 Compare February 23, 2018 22:07
@alexander-schranz alexander-schranz force-pushed the enhancement/invalid-structure-exceptions branch from 5f8f4c3 to 8d2dfa8 Compare February 23, 2018 22:47
@alexander-schranz alexander-schranz force-pushed the enhancement/invalid-structure-exceptions branch from 8d2dfa8 to 1c9a4f7 Compare February 26, 2018 15:41
@danrot danrot merged commit c2e5789 into sulu:release/1.5 Feb 26, 2018
@alexander-schranz alexander-schranz deleted the enhancement/invalid-structure-exceptions branch November 27, 2019 07:48
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

Successfully merging this pull request may close these issues.

2 participants