Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
155 stars 211 forks source link

hpp icon and editor wysiwyg doesn't work #186

Closed ptraing closed 6 years ago

ptraing commented 7 years ago

Hello,

I am at version 2.1.1 Adyen module with the pull request https://github.com/Adyen/adyen-magento2/pull/181

Mode: Production Bundling: Enabled Merging: Disabled Minifying: Enabled Magento 2.1.5

Since I set up this pull request I don't see the payment hpp icons and I also noticed that the wysiwyg editor did not work too.

For wysiwyg editor : I have as error Refused to execute script from 'http://mysite.com/admin/admin/cms_page/edit/page_id/80/key/24c9a5d4193359efb292097503463c3cc970244ebf10f5a64ca0f17e7b40fea8//plugins/nonbreaking/editor_plugin.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled

For payment hpp icons : I have 404 not found for the icons.

When I'm in developer mode always work...

Have you an idea ? Can you test if it works for you, please?

Did anyone else encounter this error?

Best regards

Philippe

rikterbeek commented 7 years ago

Hi @ptraing,

Not sure if this problem is related to our extension. What is the url of the icons it is trying to get ?

Regards, RIk Adyen

ptraing commented 7 years ago

Hi @rikterbeek,

For the WYSIWYG editor, I tested by rollback to version 2.0.6 of the adyen module, and I noticed that the wysiwyg was working. Then I put version 2.1.1 the wysiwyg was working too. It was when I added the pull request: https://github.com/Adyen/adyen-magento2/pull/181 that the wysiwyg did not work anymore.

For icons, I have as url: https://mysite.com/static/version1.0.0.244/frontend/Magento/blank/en_US/Adyen_Payment/images/logos/klarna.png in 404. While I configure my site to take my theme and not the theme of Magento_blank.

(I'm talking about when I'm in production mode, in developer mode everything works fine)

Regards, Philippe

rikterbeek commented 7 years ago

HI,

Could you update to the develop branch and see if that is fixing the problem ? I can't reach your page so I can't see what is going wrong. It could be that the theme (Magento\blank) is not found ?

Regards,

ptraing commented 7 years ago

Hi @rikterbeek,

I update with the develop branch, and I have the same problems :( :

The theme Magento\blank is not applied theme in my website.

Mode: Production Bundling: Enabled Merging: Disabled Minifying: Enabled Magento 2.1.5

When I'm a developer mode always works.

Regards,

rikterbeek commented 7 years ago

HI @ptraing,

It could be not applied but used because of a fallback mechanisme. Are you able to debug this part: https://github.com/Adyen/adyen-magento2/blob/master/Helper/PaymentMethods.php#L228-L248

Regarding the WYSIWYG could you be more specific what is going wrong do you see any errors ?

Regards, Rik Adyen

ptraing commented 7 years ago

Hi @rikterbeek ,

I debug the file : https://github.com/Adyen/adyen-magento2/blob/master/Helper/PaymentMethods.php#L228-L248 and for me :

$themeId = $this->_design->getConfigurationDesignTheme(\Magento\Framework\App\Area::AREA_FRONTEND); is my theme code. So, when I modify this lines like :

$themeCode = "Magento/blank"; $themeId = $this->_design->getConfigurationDesignTheme(\Magento\Framework\App\Area::AREA_FRONTEND); if(!empty($themeId)) { $themeCode = $themeId; } it's Work.

And for Wysiwyg (we doesn't switch wysiwyg editor): capture du 2017-09-12 12-15-00

For example, in content > pages > choose page and I have admin/cms_page/edit/page_id/80/key/f3398a0f3e2cdb765dddf1a2823b17eafce56cf7faf975a36d41003e03e1336b//plugins/xhtmlxtras/editor_plugin.js

there are two "//" and editor_plugin.js is loading properly (code 200) it's strange .

Request URL:http://mysite.com/admin/admin/cms_page/edit/page_id/80/key/f3398a0f3e2cdb765dddf1a2823b17eafce56cf7faf975a36d41003e03e1336b//plugins/xhtmlxtras/editor_plugin.js Request Method:GET Status Code:200 OK Remote Address:10.0.0.2:80 Referrer Policy:no-referrer-when-downgrade

I think that it's because of df.js because when i remove it, it work

do you have the same thing?

Thanks Best regards,

Philippe

lancergr commented 7 years ago

Hi @ptraing

Magento should retrieve the theme id and not theme code (https://github.com/magento/magento2/blob/2.1.5/app/code/Magento/Theme/Model/View/Design.php#L163).

Could you please check if you are affected by this issue (theme not registered in production mode) and apply the temporary fix that was suggested? https://github.com/magento/magento2/issues/2797#issuecomment-216776283

Best Regards, Giorgos Adyen

lancergr commented 7 years ago

Hi @ptraing

I am closing this for now. Feel free to re-open it if you are still experiencing this issue.

Best Regards, Giorgos Adyen

jserveaux commented 7 years ago

Hi everyone,

I work with Philippe (ptraing), on a very important project where we are trying to add Klarna Payment Method with the new release of Adyen.

We just install the 2.1.2. module version on a standalone 2.1.5. M2 EE instance and we still have the same problem about WYSIWYG.

Note the module work properly when we are in developper mode and the issue appear as soon as we activate the javascript minification.

See the console errors we encountered : 8pkvkfrpn3idltcpb

Can you test the module on a standalone version and minimified mode and let's know us if you have the same behavior ?

Thank you.

rikterbeek commented 7 years ago

Hi @jserveaux,

I am not able to reproduce this on production level with minimified mode turned on. Could it be that it is interfering with some other modules? Were you able to reproduce this on a clean installation on production level with minimized mode turned on?

Regards, Rik Adyen

jserveaux commented 7 years ago

Hi Rick,

Like I said, this test is on a standalone 2.1.5. M2 EE instance. What test or informations you need to have for reproduce this issue ?

Thank

jserveaux commented 7 years ago

Hi Rick,

Did you see my previous response ? We tested the module on a standalone 2.1.5. M2 EE instance without other module with production level with minimized mode turned on.

What test or informations you need to have for reproduce this issue ?

Thank

lancergr commented 6 years ago

Hi @jserveaux @ptraing

Thanks for reporting this! We have pushed a bugfix for it here: 14802ff0de91f30d793bf3ccc08db9d370c59aa2

Please let me know if this works for you.

Best Regads, Giorgos Adyen