Code Monkey home page Code Monkey logo

froshdevelopmenthelper's Introduction

Development Helper for Shopware 6

Successor plugin of FroshProfiler and FroshMailCatcher

Installation

Git Version

  • Checkout Plugin in /custom/plugins/FroshDevelopmentHelper
  • Download FroshPluginUploader and run ext:prepare [folder to plugin]
  • Install the Plugin with the Plugin Manager

Features

  • Show Twig Includes / Blocks in Template as HTML Comment
  • Disable Annoying Storefront Error Handler
  • Disables Twig Cache
  • Twig Variables in Twig Tab
  • Generate definition from command line

Generate plugin

./bin/console frosh:make:plugin <plugin-name>

Optional with --namespace=xxx\\xx specifying the namespace

Generating Entities or edit Entities

Start wizard with

./bin/console frosh:make:definition My\\Plugin\\Namespace\\SomeDefinition

Generate Migration

./bin/console frosh:make:migration <plugin-name> <entity-name>

Example entity name: product, category, order

Checks the difference of that definition with the database and creates a migration

Generate Twig Extension file

./bin/console frosh:extend:template <plugin-name>

Asks for the block you want to extend and creates the twig extension file for you

SQL Logger for Console Debugging

Prints executed SQL to the console, in such a way that they can be easily copied to other SQL tools for further debugging. This is similar to the symfony debug bar, but useful in CLI commands and tests.

Usage:

 Kernel::getConnection()->getConfiguration()->setSQLLogger(
     new \Frosh\DevelopmentHelper\Doctrine\EchoSQLLogger()
 );

Known issues

Some HTML is not rendered correctly when this plugin is active 💣

This plugin can cause problems with blocks, due to the feature to show the block name as HTML comment. If you encounter such issues with your plugin or project, you can configure this in config/packages/frosh_development_helper.yaml

There is a predefined list of pattern which likely would cause such problems - feel free to provide a pull request with more such generic patterns.

froshdevelopmenthelper's People

Contributors

amenk avatar bragento avatar christopherdosin avatar mitelg avatar mynameisbogdan avatar raphael-homann avatar shyim avatar tinect avatar vintagesucks avatar zaifastafa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

froshdevelopmenthelper's Issues

Composer deps within composer deps leads to error

Even though it is not advertised in the installation instructions in README.md, I would rather install free developer tools via composer instead of relying upon them through the Shopware Store. A simple composer require frosh/development-helper allowed me to installed the tool without issues. However, the command bin/console plugin:install FroshDevelopmentHelper --activate caused a really weird error: Warning: require(/data/git/yireo/yireo-sites/www.yireo.com-shopware/vendor/frosh/development-helper/vendor/vendor/autoload.php): failed to open stream: No such file or directory.

To get rid of the issue, I hacked the file src/FroshDevelopmentHelper.php and removed the inclusion of the autoloader (because my installation is composer-driven already and doesn't need this method):

//if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
//    require_once __DIR__ . '/../vendor/autoload.php';
//}

Obviously, core hacks are not good for mental health. So I'm opening this issue to discuss better ways of differentiating between a composer install of this helper and a non-composer install. The if statement could check for this and then determine whether or not including the autoloader is a good idea.

I've tested out a few things. Checking for getenv('COMPOSER_HOME') is not a solid approach. To me the best approach would be to check if the parent parent parent is vendor. And if so, the plugin is installed via composer. It is weird logic, but does the job:

$installedViaComposer = (basename(dirname(dirname(dirname(__DIR__)))) === 'vendor');
if (!$installedViaComposer && file_exists(__DIR__ . '/../vendor/autoload.php')) {
    require_once __DIR__ . '/../vendor/autoload.php';
}

Another mechanism could be to keep the current PHP statement as it is, but simply remove the local autoload.php file when the package is installed via composer. For this, the following section could be added to the composer.json file:

    "scripts": {
        "post-install-cmd": [
            "rm ./vendor/autoload.php"
        ]
    },

What do you think?

Create template extension by block

./bin/console frosh:extend:template

-> Show with SymfonyStyle all blocks with a filter
-> After choosing create the same path in the plugin with the typical boilerplate
-> If file existing just add the twig block there

Sending mails no longer works

PHP Version

7.4.23

Shopware Version

6.4.5.1

Actual behaviour

If the plugin is active, sending e-mails is no longer working.
I can get the following message in the logs:

app.ERROR: Could not send mail: Email "!-- INCLUDE BEGIN 25cb1ee2729cb4924ede4c010316a33e () -->Storefront<!-- INCLUDE END 25cb1ee2729cb4924ede4c010316a33e --> <[email protected]" does not comply with addr-spec of RFC 2822. Error Code:0 Template data:  {"recipients":{"[email protected]":"[email protected]"},"senderName":"{{ salesChannel.name }}","salesChannelId":"c3ffc4812afd4428a719d309fd9a593a","templateId":"702555ca838043298e81535111b0877d","customFields":null,"contentHtml":"<div style=\"font-family:arial; font-size:12px;\">\n    <p>\n        The following Message was sent to you via the contact form.<br\/>\n        <br\/>\n        Contact name: {{ contactFormData.firstName }} {{ contactFormData.lastName }}\n        <br\/>\n        Contact email address: {{ contactFormData.email }}\n        <br\/>\n        Phone: {{ contactFormData.phone }}<br\/>\n        <br\/>\n        Subject: {{ contactFormData.subject }}<br\/>\n        <br\/>\n        Message:<br\/>\n        {{ contactFormData.comment|nl2br }}<br\/>\n    <\/p>\n<\/div>\n","contentPlain":"The following Message was sent to you via the contact form.\n\nContact name: {{ contactFormData.firstName }} {{ contactFormData.lastName }}\nContact email address: {{ contactFormData.email }}\nPhone: {{ contactFormData.phone }}\n\nSubject: {{ contactFormData.subject }}\n\nMessage:\n{{ contactFormData.comment }}\n","subject":"Contact form received - {{ salesChannel.name }}","mediaIds":[]}  [] []

(replaced my email with [email protected])

I guess that the cause is that the sender name has the html comments with "INCLUDE BEGIN" added.
Maybe there is a way to fix this and prevent adding these commits to sender name?

Expected behaviour

Sending of mails should work as before.

Steps to Reproduce?

  • Enabling frosh development helper plugin
  • Try to sent an email (e.g. via contact form)
  • Search for error message in the log files

Symfony Debug Bar not loading when FroshDevelopmentHelper active

PHP Version

8.1

Shopware Version

6.5.2.1

Actual behaviour

Symfony Debug Bar not loading when FroshDevelopmentHelper active. Just shows "loading" message and 404 error in browser JS console. If is deactivated the Symfony debug bar is working.

Expected behaviour

Both working fine together.

Steps to Reproduce?

install FroshDevelopmentHelper, activate, enable dev in ENV

Installation Problems

Got problems with installation:

Could not install plugin, got 2 failure(s).
Required plugin/package "nikic/php-parser 4.3.0" is missing or not installed and activated
Required plugin/package "friendsofphp/php-cs-fixer ^2.16" is missing or not installed and activated

Composer replace breaks with development template

Hi,
When installing the plugin with composer the replace section removes necessary dependencies which breaks Shopware. An example is "symfony/framework-bundle": "4.4.1".
Can the replace section in composer.json be removed?

We're using the Shopware production template.

Generating Entities or edit Entities

PHP Version

8.1

Shopware Version

6.4.20.1

Actual behaviour

While trying to create an entity I got the error "Warning: Uninitialized string offset 0 " in EntityLoader.php line 201

Expected behaviour

Start Wizard

Steps to Reproduce?

While trying to create an entity I got the error "Warning: Uninitialized string offset 0 " in EntityLoader.php line 201. After a vardump of InputInterface from MakeDefinition.php line 74 I saw that there the backslashes were removed from the string. A Google search led me to the issue symfony/symfony#31046 .
This seems to be the normal behaviour. I had to use 4 backslashes: My\\Namespace\\SomeDefinition.

I use the VSCode terminal on Windows (WSL) with Shopware in a ddev/docker container.

Stopwatch error when trying to deactivate plugin

PHP Version

8.1

Shopware Version

6.4

Actual behaviour

[Symfony\Component\ErrorHandler\Error\FatalError]                                                              
  Compile Error: Cannot declare class Symfony\Component\Stopwatch\Stopwatch, because the name is already in use

Expected behaviour

plugin deactivated

Steps to Reproduce?

bin/console plugin:deactivate FroshDevelopmentHelper

the error occurs in admin panel also

Block hints breaks Action-Urls

The Block hints break the Form-Actions for the Shopping-Cart Button.

Error that shows up when clicking Add to Shopping-Cart Button:

No route found for "POST /Aerodynamic-Concrete-Cosmetex/%3C!--%20BLOCK%20BEGIN%20page_product_detail_buy_form_action%20(platform/src/Storefront/Resources/views/storefront/page/product-detail/buy-widget-form.html.twig)%20--%3E/checkout/line-item/add%3C!--%20BLOCK%20END%20page_product_detail_buy_form_action%20--%3E" (from "http://localhost:8000/Aerodynamic-Concrete-Cosmetex/d82eab94129548ce9284e4db4dd09740")

Because form-markup looks like this:

<form id="productDetailPageBuyProductForm" action="<!-- BLOCK BEGIN page_product_detail_buy_form_action (platform/src/Storefront/Resources/views/storefront/page/product-detail/buy-widget-form.html.twig) -->/checkout/line-item/add<!-- BLOCK END page_product_detail_buy_form_action -->" method="post" class="buy-widget" data-add-to-cart="true">
</form>

Migration tables are created with utf8_unicode_ci while Shopware uses utf8mb4_unicode_ci

PHP Version

8.1

Shopware Version

6.5.7.3

Plugin Version

1.0.2

Actual behaviour

All tables created by frosh:make:migration have DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci

Shopware tables all have DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

Origin of the issue is doctrine itself, where utf8 is the fallback if nothing else is passed:
https://github.com/doctrine/dbal/blob/7c4aa971ca9e3195eed400ade4b3a00a2617671b/src/Platforms/AbstractMySQLPlatform.php#L564

So maybe just pass the correct charset as an option somewhere to fix this...

Expected behaviour

Generated custom tables should match shopware tables

Steps to Reproduce?

  • Use frosh:make:definition to create a simple custom entity with a single column
  • Add the definition to services.xml
  • Use frosh:make:migration to generate the Migration

Installing 0.3.0-dev via Composer removes plenty of packages

Actual behaviour

Installing the 0.3.0 branch via composer removes lots of packages and finally fails with

> [ ! -f install.lock ] || bin/console system:update:finish
PHP Fatal error:  Uncaught RuntimeException: You need to add "symfony/framework-bundle" as a Composer dependency. in /home/user/example/projects/example.de/bin/console:24
Stack trace:
#0 {main}
  thrown in /home/user/example/projects/example.de/bin/console on line 24
Script [ ! -f install.lock ] || bin/console system:update:finish handling the post-update-cmd event returned with error code 255

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Expected behaviour

I can install and use the plugin, including the dev branch :-)

Environment

Please provide information about the environment in which the issue occurs (e.g. PHP version, webserver, Shopware version, debugging information if you can provide).

Steps to reproduce

composer2 require --dev --dry-run frosh/development-helper=0.3.x-dev
./composer.json has been updated
Running composer update frosh/development-helper --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 2 updates, 140 removals <-------

Possible cause

4068e54 ?

The checkout summary layout is affected

When the plugin is activated, the summary box layout is messed up (if the customer comment box is not checked in cart setting) due to this line -
platform/src/Storefront/Resources/views/storefront/page/checkout/_page.html.twig:27

It checks if the block is empty or not, but due to hidden twig comments it is not empty so it applies the checkout-aside-no-offset class.

Expected:
image

How it is instead:
image

Plugin modifies Breadcrumb Object in Twig

PHP Version

8.1.21

Shopware Version

6.4.20.2

Actual behaviour

if I do {{ dump(page.header.navigation.active.breadcrumb) }} in Resources/views/storefront/layout/meta.html.twig I get different results depending on the plugin installed or not:

Plugin not installed:

array:4 [▼
  0 => "Deutsch"
  1 => "Naturmode"
  2 => "Damen"
  3 => "Oberbekleidung Wolle"
]

Plugin installed

array:4 [▼
  "50ea50da809248fab4b7f24c4c06ac95" => "Naturmode"
  "b1eec61ad3074f049aa9033728f066a5" => "Deutsch"
  "bc23106097554f22afb09ba68d5a13f7" => "Damen"
  "bca04995131242b58142ba6909c31892" => "Oberbekleidung Wolle"
]

Two things to note here:

  1. The plugin messes up the order of the breadcrumb
  2. the plugin changes the index type from int to string / UUID

this created quite a bit of headache for us because one developer was working with this plugin while another did not. And the Theme code worked on one system like expected and on the other one it messed up :-)

Expected behaviour

The breadcrump object should be consistent with plugin installed.

Steps to Reproduce?

Dump page.header.navigation.active.breadcrumb before installing plugin and then after plugin is active.

output indentation config

we use tabs for indenting our code, so would be nice if we could say frosh:make:definition (and everything else) to output code with tab indentation, instead of spaces.

and i guess some people want to change the 4 spaces to X spaces...

ps. for bonus points, read .editorconfig (of the plugin) for indentation config.

Exception when sending an email

PHP Version

8.0

Shopware Version

6.4.3.1

Actual behaviour

When sending a (test-)mail, it results in a critical Exception, because it adds an include comment node.

Expected behaviour

The plugin should not add comments to mails, so sending an email should not trigger an exception.

Steps to Reproduce?

  • Install and activate
  • Send a test mail in backend

Plugin does not work after latest commit

Trying the 0.3 branch on shopware 6.4, it does not install anymore.

Steps already tried:

  • installation after git clone through plugin manager (as mentioned in readme)
  • installation after composer install
  • installation after composer2 install

nothing works.

Setting field as nullable works opposite of what is selected

Actual behaviour

When creating make:definition and setting a property as nullable, it creates the reverse of what we select.
For e.g a NOT NULL string is created as /** @var string|null */ with the nullable setter and getters, and if a field is set as nullable, it creates it without the null.

Expected behaviour

A nullable field should be created with a nullable indicator.

Environment

Branch: 0.2
Shopware: 6.3.5.1

Make BLACKLIST_KEYS configurable

Please describe the feature you would like to see implemented.

We're using a plugin which uses Twig blocks for attributes. This leads to unrendered HTML.

photo_2022-06-20_15-35-03
photo_2022-06-20_15-35-00

private const BLACKLIST_KEYS = [
'head_meta_tags',
'layout_head_title',
'page_product_detail_buy_form_action',
'base_body_classes',
'page_checkout_additional',
'buy_widget_buy_form_action',
];

It would be great if the BLACKLIST_KEYS could be configured via Symfony configuration.
https://symfony.com/doc/current/bundles/configuration.html

So any other Shopware app (plugin/theme) can add a src/Resources/config/packages/frosh-development-helper.xml with a config similiar to this:

<!-- src/Resources/config/packages/frosh-development-helper.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:frosh-development-helper="http://example.org/schema/dic/frosh_development_helper"
    xsi:schemaLocation="http://symfony.com/schema/dic/services
        https://symfony.com/schema/dic/services/services-1.0.xsd">

    <frosh-development-helper:config>
        <frosh-development-helper:blacklist-keys>
          <key>plugins_maxia_listing_variants_configurator_option_radio_label_attributes</key>
          <key>...</key>
        </frosh-development-helper:blacklist-keys>
    </frosh-development-helper:config>
</container>

And all the keys are merged with the default keys then.

BTW it would be great if a new version would be released to include the fix for #45

ManyToMany generation doesn't work

PHP Version

8.1

Shopware Version

6.4.18.0

Actual behaviour

The generation of a ManyToManyAssociationField fails.

bin/console frosh:make:definition Onedrop\\Test\\Entity\\PartyDefinition

 New property name (press <return> to stop adding fields):
 > participants

 Field type [StringField]:
 > ManyToManyAssociationField

 Reference Class:
 > Shopware\Core\Checkout\Customer\CustomerDefinition


In EntityLoader.php line 109:
                                                                           
  Warning: Undefined property: PhpParser\Node\Expr\ClassConstFetch::$args  
                                                                           

frosh:make:definition <namespace>

Expected behaviour

It should generate a ManyToMany Definition and reference that properly.

Steps to Reproduce?

Try to generate a ManyToManyAssociationField with reference to CustomerDefinition.

Commands not visible under Shopware 6.4.3.0

Question

Having installed version 0.3.2 under Shopware 6.4.3.0, I found that none of the CLI commands are working. They are simply not being detected. Installing the same version on Shopware 6.4.2.1 works just fine. So it seems there is something different, perhaps related to the introduction of Symfony 5.3?

Anyway, when trying to analyse the issue, it struck me that the service definitions in services.xml were also not declaring any of the commands as a service and therefore none of the classes are tagged as console.command. So that leads also to a complete lack of knowledge on my side (and few others that I've discussed this with): How can the CLI commands be picked up upon if a service definition is missing? Perhaps if someone who knows could briefly explain, then I can do the rest of the debugging.

Code generation of an IntField uses String for minValue and maxValue

PHP Version

8.1

Shopware Version

6.4.18.0

Actual behaviour

When generating a definition with the command, it is possible to choose an IntField, and it's minValue and maxValue. The generated code of the min and max value is a String, not an Int. class IntField() only takes ?int as possible type. The generated code is:
new IntField('interval', 'interval', '1', '8766')

Expected behaviour

The generated code should be:
new IntField('interval', 'interval', 1, 8766)

Steps to Reproduce?

Generate a definition with an IntField with help of the command. Then input a minValue and a maxValue when asked by the command.

global $classLoader; in EntityLoader->getNewEntityFolder() is null

PHP Version

8.1

Shopware Version

6.4.18.0

Actual behaviour

    private function getNewEntityFolder(string $namespace): string
    {
        global $classLoader;

        $prefixes = $classLoader->getPrefixesPsr4();

$classLoader is null and an error [Error] Call to a member function getPrefixesPsr4() on null is thrown

Expected behaviour

$classLoader is an instance of ClassLoader and returns the prefixes when executing getPrefixesPsr4().

Steps to Reproduce?

I installed store.shopware.com/froshdevelopmenthelper (Version 0.3.6) via composer, installed the plugin via console and ran the command bin/console frosh:make:definition My\\Name\\Space

[Generation] Support for `JsonField`

Currently there seems to be a bug if a JsonField is used in the frosh:make:definition command:

[2020-09-19 12:35:31] console.ERROR: Error thrown while running command "frosh:make:definition '...'". 
Message: "Argument 1 passed to Symfony\Component\Console\Formatter\OutputFormatter::escapeTrailingBackslash() must be of the type string, array given, called in /srv/http/sw/development/vendor/symfony/console/Formatter/OutputFormatter.php on line 39"

The problem seems to be, that the default value of propertyMapping is an array:
https://github.com/shopware/platform/blob/master/src/Core/Framework/DataAbstractionLayer/Field/JsonField.php#L25
Which is responsible for the error generated here:
https://github.com/FriendsOfShopware/FroshDevelopmentHelper/blob/master/src/Component/Generator/QuestionHandler/GenericHandler.php#L71

While the basic fix would be, to use something like json_encode to display the field and prevent the error:

-            $question = new Question('Parameter ' . $parameter->name, $default);
+            $defaultString = $default;
+            if (is_array($defaultString)) {
+                $defaultString = json_encode($default);
+            }
+            $question = new Question('Parameter ' . $parameter->name, $defaultString);

I think this issue needs to be fixed on a deeper level, i.e. one probably wants to be able to specify the values for this field.

Therefore I think one needs to implement something like a JsonFieldHandler. If I find time, I think I can help with this as well.

404 when adding product to cart with FroshDevelopmentHelper activated

PHP Version

8.0

Shopware Version

6.4.9.0

Actual behaviour

When the FroshDevelopmentHelper is activated you get a 404 in the offcanvas cart when adding a product from it's product detail page to it.

I just noticed it's because it then does a request to the following URL:
http://localhost:8000/MyProduct/%3C!--%20BLOCK%20BEGIN%20buy_widget_buy_form_action%20(vendor/shopware/platform/src/Storefront/Resources/views/storefront/component/buy-widget/buy-widget-form.html.twig)%20--%3E/checkout/line-item/add%3C!--%20BLOCK%20END%20buy_widget_buy_form_action%20--%3E

So somehow it includes the BLOCK-comments which FroshDevelopmentHelper adds.

Adding a product from a product slider just works fine, it's just the "Add to cart"-button on the product detail page.

Expected behaviour

Adding a product to cart should be working with FroshDevelopmentHelper activated.

Steps to Reproduce?

  1. Setup a Shopware 6 shop
  2. Install and activate FroshDevelopmentHelper
  3. Go to a product detail page and add it to cart via the button in the buy-box

bin/console does not work when plugin is installed

Hi I am using the latest build of this repo from the git with Shopware 6.2.2. When executing bin/console list it gives me a huge error which seems like a vendor dependency related issue. Even after uninstalling the plugin the error stays unless I remove the vendor directories.

I do not have the error right now as I would have to setup the plugin again in the shop which I have already removed but I think it can be easily reproduced by

  • installing the plugin
  • installing vendor dependencies in the repo folder and inside the vendor directory
  • executing bin/console list in the shop root

Thanks.

Cannot create JsonField in make:definition

Actual behaviour

When selecting JsonField it gives an error
Argument 1 passed to Symfony\Component\Console\Formatter\OutputFormatter::escapeTrailingBackslash() must be of the type string, array given, called in /var/www/html/sw6/vendor/symfony/console/Formatter/OutputFormatter.php on line 47

Expected behaviour

Can create JsonField like other fields

Environment

Repository branch: 0.2
Shopware: 6.3.5.1

HTML comments in sitemap.xml are making it invalid

PHP Version

8.0.20

Shopware Version

v6.4.9.0

Actual behaviour

In the generated XML-File for the are HTML comments before the xml declaration. That causes the sitemap.xml to be invalid.

Code with the plugin activated

<!-- INCLUDE BEGIN @Storefront/storefront/page/sitemap/sitemap.xml.twig (vendor/shopware/storefront/Resources/views/storefront/page/sitemap/sitemap.xml.twig) --><!-- BLOCK BEGIN sitemap (vendor/shopware/storefront/Resources/views/storefront/page/sitemap/sitemap.xml.twig) --><?xml version="1.0" encoding="UTF-8"?>
<!-- BLOCK BEGIN sitemap_content (vendor/shopware/storefront/Resources/views/storefront/page/sitemap/sitemap.xml.twig) -->    <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
        <!-- BLOCK BEGIN sitemap_content_sitemaps (vendor/shopware/storefront/Resources/views/storefront/page/sitemap/sitemap.xml.twig) -->                            <sitemap>
                    <loc>[*redacted SITEMAP-URL]</loc>
                    <lastmod>2022-06-16T12:42:00+02:00</lastmod>
                </sitemap>
                    <!-- BLOCK END sitemap_content_sitemaps -->    </sitemapindex>
<!-- BLOCK END sitemap_content --><!-- BLOCK END sitemap --><!-- INCLUDE END @Storefront/storefront/page/sitemap/sitemap.xml.twig -->

Code without the plugin activated

<?xml version="1.0" encoding="UTF-8"?>
    <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
                                    <sitemap>
                    <loc>[*redacted SITEMAP-URL]</loc>
                    <lastmod>2022-06-16T13:15:51+02:00</lastmod>
                </sitemap>
                        </sitemapindex>

Most of these comments are no problem but the comments before <?xml version="1.0" encoding="UTF-8"?> are invalidating the file.

Expected behaviour

There shouldn't be any characters before <?xml version="1.0" encoding="UTF-8"?> as the XML specification doesn't allow this.

Steps to Reproduce?

  1. Activate Plugin
  2. Access the sitemap.xml for the current shop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.