Skip to content
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

Configuration page problem with PS 8.1.5 on Windows #322

Closed
Codencode opened this issue Apr 22, 2024 · 3 comments · Fixed by #323
Closed

Configuration page problem with PS 8.1.5 on Windows #322

Codencode opened this issue Apr 22, 2024 · 3 comments · Fixed by #323
Assignees
Labels

Comments

@Codencode
Copy link

Codencode commented Apr 22, 2024

Describe the bug and add screenshots

The module configuration page in PS 8.1.5 (on Windows) is displayed poorly, because the paypal/views/css/paypal_bo.css file and the paypal/views/js/admin.js file are missing.

I attach a screenshot of the page.
Screenshot 2024-04-22 at 10-02-53 Configuration • Codencode

Apparently the problem arises because these 2 files are imported using the constant _PS_MODULE_DIR_ as follows in the file controllers/admin/AdminPaypalConfigurationController.php:

         $this->addJS(_PS_MODULE_DIR_ . 'paypal/views/js/admin.js');
         $this->addJS('https://www.paypalobjects.com/merchant-library/merchant-configurator.js', false);
         $this->addCSS(_PS_MODULE_DIR_ . 'paypal/views/css/paypal_bo.css');

By changing the constant _MODULE_DIR_ with

         $this->addJS(_MODULE_DIR_. 'paypal/views/js/admin.js');
         $this->addJS('https://www.paypalobjects.com/merchant-library/merchant-configurator.js', false);
         $this->addCSS(_MODULE_DIR_ . 'paypal/views/css/paypal_bo.css');

This solution also works in PS 1.7.

Can I create a PR with the edit?

Thank you.

Expected behavior

That the configuration page is displayed correctly

Steps to reproduce

In PS 8 go to the module configuration page and you will see the problem

PrestaShop version(s) where the bug happened

8.1.5

PHP version(s) where the bug happened

all

@clotairer
Copy link
Collaborator

Hi @Codencode
Feel free to make a PR! Our QA will test your fix in several release to be sure, there are no regression !
Many thanks.

@Codencode
Copy link
Author

Hi @Codencode Feel free to make a PR! Our QA will test your fix in several release to be sure, there are no regression ! Many thanks.

Hi @clotairer
here is the PR: #323

Thank you!

@clotairer
Copy link
Collaborator

Thank you. Github actions are OK.
We will test it and assign a relase as soon as possible.

Thanks you.

@Codencode Codencode changed the title Configuration page problem with PS 8.1.5 Configuration page problem with PS 8.1.5 and Windows Apr 23, 2024
@Codencode Codencode changed the title Configuration page problem with PS 8.1.5 and Windows Configuration page problem with PS 8.1.5 on Windows Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants