Skip to content

Throw exception when sitemap config is missing #3382

@vmeijer

Description

@vmeijer
Q A
Bug? no
New Feature? no
Sulu Version 1.4.12
Browser Version none

Actual Behavior

When running the command to dump the sitemap, it is unclear why var/sitemaps does not have the expected sitemap.xml file. The command finishes without errors / exceptions if the configuration for a host is missing.

Expected Behavior

Showing a message that proposes to check the configuration settings, so that it's easier to understand why sitemap.xml is not generated.

Steps to Reproduce

Use the following configuration in app/config/config.yml (leave out the setting default_host: "my test domain here")

sulu_website:
    sitemap:
        dump_dir: %kernel.var_dir%/sitemaps

In the root of your project directory execute:

bin/websiteconsole sulu:website:dump-sitemap
cd var/sitemaps 

sitemap.xml is not generated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions