sebastian-mollie / SyliusMolliePlugin-DO-NOT-USE-

OLD Sylius Mollie payment gateway integration. Please use the newest version. I will be closing this repo by the end of the year.
https://github.com/mollie/Sylius/releases/tag/v5.0.0
MIT License
1 stars 4 forks source link

Building plugin assets breaks Sylius styles and functionality #285

Open ristokekovic opened 2 years ago

ristokekovic commented 2 years ago

Hello

We are attempting to set up Mollie plugin version 3.6.0 on Sylius 1.10. We followed the installation manual and whenever we get to steps 10 and 11 which copy and install Mollie plugin templates into Sylius, upon executing them, both the Sylius back-office and storefront just show plain HTML content with no CSS and JavaScript.

Selection_359

We attempted different approaches described in the manual (using webpack or not) but we always get the same result. Can you please provide a more detailed instructions on how to install these assets because we cannot seem to be able to configure the plugin properly?

ristokekovic commented 2 years ago

We managed to set up the plugin properly after doing some additional research, installing some additional node packages and running some more commands in Sylius

mdeboer commented 2 years ago

There are a lot of issues with the documentation and the plugin frankly. Interfaces that contain method definitions but without an updated trait (or a separate trait) and no mention of it in the documentation. Missing migrations and errors in the code.

It was a horror show to set up and I am not sure we'll continue to use it but I really doubt it's production ready. Honestly I am not surprised by your error.

Have you tried undoing that step and proceeding with step 16 instead?

treeleaf commented 1 year ago

I used Sylius 1.11 and Mollie plugin 4.0.1. I had the same issue. I solved it by removing the files _scripts.html.twig and _styles.html.twig in templates/bundles/SyliusAdminBundle. Since they have been deprecated in favour of Layouts/_scripts.html.twig and Layouts/_styles.html.twig

I copied those two scripts from SyliusAdminBundle in Resources/views/Layout to templates/bundles/SyliusAdminBundle and added the lines in those files. Not sure if that is the right way.

templates/bundles/SyliusAdminBundle/Layouts/_scripts.html.twig:

{% include '@SyliusUi/_javascripts.html.twig' with {'path': 'assets/admin/js/app.js'} %}
{% include '@SyliusUi/_javascripts.html.twig' with {'path': 'bundles/bitbagsyliusmollieplugin/bitbag/mollie/admin.js'} %}

templates/bundles/SyliusAdminBundle/Layouts/_styles.html.twig:

{% include '@SyliusUi/_stylesheets.html.twig' with {'path': 'assets/admin/css/style.css'} %}
{% include '@SyliusUi/_stylesheets.html.twig' with {'path': 'bundles/bitbagsyliusmollieplugin/bitbag/mollie/admin.css'} %}