Announcement

Collapse
No announcement yet.

Assign CSS file to pages not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Assign CSS file to pages not working

    Miva Merchant 10.01.01

    Here's the steps I took:
    1. Created new CSS file (which is now simplified to confirm that it's not working - it should be turning every div on the site yellow, but it's not)
    2. Uploaded to CSS/JavaScript Resources > CSS Resources > Add CSS Resource
    3. Set it to Global and Active
    (The last step I had previously NOT chosen Global, then Selected new css file in list, clicked 3 dots next to Inline Edit, chose Pages, then assigned CTGY and PROD - when this didn't work I changed it to Global just trying to find the problem)

    And here's the CSS that's not working:
    HTML Code:
    div {
    background-color:#ffff00 !important;
    }
    After I couldn't see any changes, or even any hint of my custom css when using devtools to see if it's just being overridden, I cleared cache in my browser, disabled cache in Miva category template, and confirmed that Cloudflare wasn't caching. I'm stumped.

    Am I missing a step? Or misunderstanding how this works? I'm still new to Miva so I wouldn't be surprised in either case.

    #2
    Still struggling with this. I noticed that when I uploaded the file through Miva, it put it in /css/00000001/ so I connected via ftp and copied it to /css/ and saved the updated path in Miva. It still acts like it's just ignoring my custom css file. I'm at a loss.

    Comment


      #3
      Try navigating directly to the CSS file you have on the server. See if the file is updating as expected (if not then you know it's being cached by your CDN).

      I recommend assigning the file to a combined resource. You should see a combined resource by default if you're using a newer ReadyTheme. That way you won't have to worry about caching as there's automatic version control.

      Hope this helps,
      -Ryan

      Comment


        #4
        ksechrist try adding the CSS resource to a Resource Group that is already active like the css_list if you are using the Shadows default theme. The css_list resource group is added to the head tag in the Shadows theme. Here is a link to some documentation on how to assign a resource to a resource group.

        https://docs.miva.com/reference-guid...esource-groups

        css_list.JPG

        Nicholas Adkins
        Technical Training Specialist / Miva, Inc.
        [email protected]
        https://www.miva.com/mivalearn

        Comment


          #5
          Originally posted by RTHOMASDESIGN View Post
          Try navigating directly to the CSS file you have on the server. See if the file is updating as expected (if not then you know it's being cached by your CDN).

          I recommend assigning the file to a combined resource. You should see a combined resource by default if you're using a newer ReadyTheme. That way you won't have to worry about caching as there's automatic version control.

          Hope this helps,
          -Ryan
          SMH. I should have thought to try this, but I'm looking at it on the server via ftp, and the guy that manages this stuff ASSURED me that the site wasn't using cloudflare, so I never even tried. Obviously it IS being cached, because I can't load the css file in the browser with a direct link. I'll take it up with him.

          THANK YOU.

          Comment


            #6
            Originally posted by RTHOMASDESIGN View Post
            Try navigating directly to the CSS file you have on the server. See if the file is updating as expected (if not then you know it's being cached by your CDN).

            I recommend assigning the file to a combined resource. You should see a combined resource by default if you're using a newer ReadyTheme. That way you won't have to worry about caching as there's automatic version control.

            Hope this helps,
            -Ryan
            THANK YOU Ryan, but I'm pretty sure we've narrowed it down to a CDN issue now. If for some strange reason it turns out to not be the CDN, I'll try your suggestion.

            Comment


              #7
              Well crud... just to be sure before I complained, I tried loading a few of the other css files in the browser, and none of them load either. I don't know what's going on with this server. I might try your suggestions first.

              Comment


                #8
                OMG - Thanks for putting me on the right track guys - I found the problem!! This server has 3 Miva installations - I thought they all had different IPs but they don't. I figured out I needed to prepend all my paths with "Merchant2" then it worked like a charm!

                Comment

                Working...
                X