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

hpp icon and editor wysiwyg doesn't work #186

Closed
ptraing opened this issue Sep 1, 2017 · 13 comments
Closed

hpp icon and editor wysiwyg doesn't work #186

ptraing opened this issue Sep 1, 2017 · 13 comments
Assignees

Comments

@ptraing
Copy link

ptraing commented Sep 1, 2017

Hello,

I am at version 2.1.1 Adyen module with the pull request #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
Copy link
Contributor

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
Copy link
Author

ptraing commented Sep 5, 2017

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: #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
Copy link
Contributor

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
Copy link
Author

ptraing commented Sep 7, 2017

Hi @rikterbeek,

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

  • Wysiwyg editor in admin magento doesn't work
  • hpp icons doesn't display

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
Copy link
Contributor

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
Copy link
Author

ptraing commented Sep 12, 2017

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

@ptraing ptraing closed this as completed Sep 12, 2017
@ptraing ptraing reopened this Sep 12, 2017
@lancergr
Copy link
Contributor

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?
magento/magento2#2797 (comment)

Best Regards,
Giorgos
Adyen

@lancergr lancergr self-assigned this Sep 13, 2017
@lancergr
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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
Copy link

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
Copy link

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
Copy link
Contributor

Hi @jserveaux @ptraing

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

Please let me know if this works for you.

Best Regads,
Giorgos
Adyen

lancergr added a commit that referenced this issue Nov 16, 2017
Fixes #186 Remove minify_exclude and load df.js on runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants