magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Disabeling js merge,bundle,minify does not work in admin

Open Taral-Patoliya opened this issue 8 years ago • 21 comments

When disabling the js, and css ,merge, minify and bundling for default scope and keeping them enabled for website and store view scope, the admin still loads minified and bundled js

Preconditions

  1. Magento Version : 2.1.3

Steps to reproduce

  1. Disable js merge, minify, bundling for default scope in system config
  2. Enable the same in Website scope
  3. Enable the same in store view scope

Expected result

  1. Admin should load all the js files separately
  2. Frontend should load bundled files

Actual result

1.Admin loads all the files bundled

Taral-Patoliya avatar Aug 21 '17 13:08 Taral-Patoliya

This is a duplicate of https://github.com/magento/magento2/issues/6638 (which was unfortunately closed due to Magento support people not understanding the problem :p). It's certainly a bug, but a very low priority one in my opinion.

@Taral-Patoliya: any particular reasons for wanting this behaviour? Just out of curiousity :) We no longer need this ourselves, as it was a workaround for an unrelated issue which we were having, but which was fixed later on.

hostep avatar Aug 21 '17 19:08 hostep

@hostep We need to disable this behavior because we are getting js errors while accessing tiny_mce in backend for CMS Pages and Blocks, the tiny mce does not work with the js merged and bundled.

Please have a look at below screenshot screenshot from 2017-08-22 18 59 19

Taral-Patoliya avatar Aug 22 '17 13:08 Taral-Patoliya

@Taral-Patoliya thank you for your report. Please use the issue reporting guidelines to report an issue. Include the preconditions, the steps required to reproduce, the actual result, and the expected result. Please, add the following information:

  • [x] Preconditions: Magento version

okorshenko avatar Sep 07 '17 19:09 okorshenko

@okorshenko I have updated the issue, and added the precondition

Taral-Patoliya avatar Sep 08 '17 09:09 Taral-Patoliya

I'll work on this one. Just to let you know. Thanks.

roma-glushko avatar Sep 23 '17 13:09 roma-glushko

I would like to leave an update here. I have investigated this issue and create PR https://github.com/magento/magento2/pull/11270 to fix it.

Looking forward to your review.

Thanks.

roma-glushko avatar Oct 06 '17 12:10 roma-glushko

Nice job @roma-glushko!

But since in Magento 2.2.0, the developer tab is no longer available in production mode, should effort still be put into fixing this bug? Unless you can still manipulate these settings from the config.php file? (which I haven't verified yet)

hostep avatar Oct 07 '17 09:10 hostep

This is still an issue in Magento 2.2.4 and therefor the editors are not working like @Taral-Patoliya explained

versdivers avatar Jun 27 '18 07:06 versdivers

@versdivers: the editors aren't working properly because some module will most likely have overwritten the default <minify_exclude> configuration of Magento which disables minifying for the tiny_mce editor js files, and overwriting that setting by another module will cause the editor to no longer work properly. You can read more about this issue over here: https://github.com/magento/magento2/issues/11577

In Magento 2.2.4 you are most likely running into the issue because one of the Klarna modules which get included in 2.2.4 by default is overwriting that setting. You can fix it by disabling those Klarna modules, or updating them, I think I saw an update coming through using composer and it no longer seem to include this problem.

I'm also not considering this a bug anymore, I think the real bug is that you are able to change this setting over website & storeview scope. I believe it would be better if you could only configure this setting on a global level. The static content deploy mechanism is completely new in Magento 2 so we can no longer compare to how minifying worked in Magento 1.

hostep avatar Jun 27 '18 18:06 hostep

@hostep I do believe that you can make the merging a scoped level setting. I mean.. Both the merged and the normal files are getting generated anyways. Just make them load the one or the other based on the scoped level...

the tiny_mce is a bug indeed. But if there is a setting and it doesnt work that classifies as a bug. even tough removing the scope level is the fix

versdivers avatar Jun 27 '18 20:06 versdivers

Both the merged and the normal files are getting generated anyways.

Ah, I wasn't aware of this, sorry, request sound reasonable then :)

hostep avatar Jun 28 '18 07:06 hostep

Well i am running a production website that merges everything. I still have the normal pub/static/frontend/vendor/theme/store/... filles and i also have the merged filles. If i have some time i will dig into the code to see where we can adjust some things. If i do not forget it. For now my biggest problem is solved with the update of Klarna module with composer

versdivers avatar Jul 04 '18 02:07 versdivers

This SHOULD be fixed for sure! Because Merging and Bundling JS in admin area for us caused error in completeLoad() method of lib/web/requirejs/require.js on Catalog -> Products page. It TOTALLY STUCKS in FF, and mostly totally stucks in Chrome! This is another huge stone to Magento's "stability". I even don't pray you will read this and fix this bug in a year. Community version should be fixed by a community, we got it long time ago. Thanks for the attention!

denysaw avatar Nov 15 '18 20:11 denysaw

@denysaw what version are you using? on 2.2.6 we do not have any issue with merging

CompactCodeEU avatar Nov 15 '18 20:11 CompactCodeEU

2.2.6 CE, sure. I console.logged all js files, which goes thru evaluation and there're just Magento's files ( Dunno even what to think. My only chance was to disable merge/bundle in admin area. But it's unreal, yep. Even tried to add scope 'store' rows in DB with configs (merge/bundling) just for store. Nothing (

denysaw avatar Nov 15 '18 21:11 denysaw

How is Magento installed? Did you composer install it or? maybe run a composer update. There needs to be some difference between our installations.

CompactCodeEU avatar Nov 15 '18 21:11 CompactCodeEU

Hi @engcom-backlog-tomash. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • [ ] 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

magento-engcom-team avatar Jan 10 '19 13:01 magento-engcom-team

@engcom-backlog-tomash Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97560, MAGETWO-97561 were created

magento-engcom-team avatar Jan 10 '19 14:01 magento-engcom-team

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

m2-assistant[bot] avatar Sep 08 '22 06:09 m2-assistant[bot]

Verified the issue on Magento 2.4-develop branch but the issue is not reproducible. Configured JS bunding in Production mode as per devdocs and no Js errors were observed on admin UI and frontend. Kindly recheck the issue on Magento 2.4-develop branch as it is having latest code base and upcoming 2.4.x release. Please provide missing steps if any if the issue is still reproducible. Thank you. image

engcom-November avatar Sep 08 '22 12:09 engcom-November

@engcom-November: the issue is not about errors in the console

The issue is about having the ability to disable JS bundling, or merging or minifying in the admin storeview only. So that you can have it enabled on the frontend storeviews but disabled in the adminhtml storeview.

hostep avatar Sep 08 '22 12:09 hostep

Hi @engcom-Dash. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
      DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
    1. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

m2-assistant[bot] avatar Nov 03 '22 03:11 m2-assistant[bot]

@magento give me 2.4-develop branch

engcom-Dash avatar Nov 03 '22 08:11 engcom-Dash

@magento give me 2.4-develop instance

engcom-Dash avatar Nov 03 '22 08:11 engcom-Dash

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

Hi @engcom-Dash, here is your Magento Instance: https://14e8683c8f0527122c351834bf9d1e7e.instances.magento-community.engineering Admin access: https://14e8683c8f0527122c351834bf9d1e7e.instances.magento-community.engineering/admin_77aa Login: 00dbd524 Password: a0fad28d15b8

Hi @ Taral-Patoliya,

We are worked the issue with 2.4-develop instance...we are not able to reproduce the issue.we are getting actual result. Steps we followed:

1.Install magento Instance 2.go to stores 3.Click Advanced Go to developer 4.Click Js settings 5.Disable Js merge, minify, bundling for default scope in system config 6.Enable the same in Website scope 7.Enable the same in store view scope 8.In admin Panel all the Js files loaded separately

We are getting expected result as per your description.

I attached the screenshots for your Clarification: These Screenshots refer Stores configuration as per your steps to reproduce. Screenshot 2022-11-03 at 3 28 01 PM Screenshot 2022-11-03 at 3 28 19 PM

Screenshot 2022-11-03 at 2 46 59 PM

Once the configuration admin Loaded all the Js files loaded separately.... Screenshot 2022-11-03 at 3 29 40 PM Screenshot 2022-11-03 at 3 31 50 PM

Let us know if we missing anything !!!

Thanks!!!

engcom-Dash avatar Nov 03 '22 10:11 engcom-Dash

@engcom-Dash: it kind of looks good I think (not sure why files aren't bundled in the admin that sounds like a problem still). But next to this test, can you also try the reverse by:

  • Disabling Js merge, minify, bundling for default scope in system config
  • Enabling them in Website scope
  • Enabling them in store view scope

Which you said you did, but according to your screenshots you did the exact opposite...

Update: make sure you have production mode enabled, otherwise those settings won't be put into effect

hostep avatar Nov 03 '22 11:11 hostep

How to unsubscribe of this channel? Magento is finally dead, but I'm still getting notifications of this thread and GitHub bugs to unsubscribe me ((

denysaw-gaming avatar Nov 03 '22 11:11 denysaw-gaming

@denysaw-gaming: There should be an Unsubscribe button on the right side of this ticket. If there is only a Subscribe button, press it and then press Unsubscribe afterwards, that should hopefully do the trick :) Or stop watching the project entirely in github, that might also help ...

If you want to see what the future of Magento looks like, I would suggest you start following https://mage-os.org/ instead where we will try to continue with moving it forward without Adobe's help.

hostep avatar Nov 03 '22 12:11 hostep