Inhalte aufrufen

Profilbild

Dev scss files affecting Live site.


4 Antworten zu diesem Thema

#1 jbonisLCP

jbonisLCP

    Newbie

  • Members
  • 3 Beiträge

Geschrieben: 16 February 2018 - 18:20

My company is working with a contractor on developing a new smartstore, as they recommended, so it is my first time working with this system.

I've been put in charge of implementing some CSS changes as the end client requested, and I'm having some issues getting the changes to show on the site.

The instructions I was given includes:

Themes/Flex/etc should not be changed - that is the theme used across all storefronts.
/Themes/ClientDev/etc is where changes should be made - the system looks here, first, for a file, and if it does not find one, then it looks to Flex.
/Themes/ClientProd/etc is where the live storefront is located.  Same rules.
If you add any new files to one of the non-Flex storefronts you need to restart the application in order to have the storefront see it.

I have made a number of changes in /ClientDev/ that have worked just fine.  But then I started running into issues.  I have two issues thus far that might be related, I don't know.

The first is in /Themes/ClientDev/Content/bs4/scss/ - I need to make a change to _dropdown.scss.  And No matter how often I restart the application and reload the page, the changes do not take hold.  I ran into something like this, earlier, with /Content/_megamenu.scss, and found I needed to also copy over theme.scss in order for it to load.  I could not find anything like that in bs4, however.  In fact, I can't find a single file in the whole system that references _dropdown.scss.

The second issue is in a change I am trying to make to /Content/_cart.scss.  This is where it gets really odd.  I make the change in /ClientDev/, restart the application, and the change does not get reflected on the dev site.  It DOES, however, get reflected on the live client site. (/ClientProd/).  Why would this file be getting crossed wires so that the Dev file affects the Live site but not the Dev site?

 



#2 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1071 Beiträge

Geschrieben: 19 February 2018 - 18:19

Have you tried turning off Asset Caching? (Configuration > Themes > Settings > Enable asset caching). We highly recommend to disable the asset cache while developing or customizing themes.


Murat Cakir
SmartStore AG


#3 jbonisLCP

jbonisLCP

    Newbie

  • Members
  • 3 Beiträge

Geschrieben: 20 February 2018 - 17:25

At your advice, I turned off Asset Caching.  However, the changes to the test files are still showing up on the live site instead of the test site.



#4 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1071 Beiträge

Geschrieben: 20 February 2018 - 18:11

The necessity to restart the app for the changes to take effect definitely indicates enabled asset caching.

 

However, the changes to the test files are still showing up on the live site instead of the test site.

 

That one indicates that ClientProd is a child theme of ClientDev. But I need more info:

  • How is the inheritance chain of your themes configured? (theme.config > Theme[baseTheme] attribute)
  • In which folder exactly did you change files?

BTW, you never should change 3rd party libraries like Bootstrap 4 directly, your changes will most likely be lost in the next library update. Instead, you should overwrite CSS in _user.scss, which is empty by default and exists for exactly this purpose.


Murat Cakir
SmartStore AG


#5 jbonisLCP

jbonisLCP

    Newbie

  • Members
  • 3 Beiträge

Geschrieben: 20 February 2018 - 18:31

The contractor who set it up took a look at it, and now it's working just fine, with regards to live and dev.  So unfortunately, I cannot run tests to figure out why it was happening anymore.  He assures me he didn't change anything, but it is working just fine now.

 

Additionally, that _user.scss file tip is very useful, thank you so very much.





Auf dieses Thema antworten