1

I have a complex VF page that needs a lot of updates, so I've created a copy of it to work on. Apart from the name, all else is identical - it even (for now) points to the same controller. In Setup, in Visualforce Pages, I've tries setting the 'Available for Lightning Experience, Lightning Communities, and the mobile app' checkbox, even though the original did not have this set.

But, on the original page, the Lightning Styling works, while on my copy it doesn't. 2 screenshots - the first is what it's supposed to look like, the second is what the new page looks like.

Original, Working page

New, non-working page

If I look in Dev tools, I can see a CSS difference:

The original page uses:

https://britisheventing--prodmirror--c.cs110.visual.force.com/apexpages/slds/latest/assets/styles/salesforce-lightning-design-system-vf.min.css

The new page uses: https://britisheventing--prodmirror--c.cs110.visual.force.com/slds/css/lKu4b4zrMH3Fa5dSdO_jjA/min/scoped/one:oneNamespace,force:sldsTokens,force:base,force:oneSalesforceSkin,force:levelTwoDensity,force:themeTokens,force:formFactorLarge/slds.css

So, both style sheets come from the same Org, but different paths, and have different names.

The first 3 lines of both pages read:

 <apex:page standardStylesheets="false" applyHtmlTag="true" applyBodyTag="true" docType="html-5.0"  tabStyle="Entry__c" controller="RefundEntriesCtrl">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <apex:slds />

Edit:

I added:

{!URLFOR($Asset.SLDS, '/')}

to both pages. On the page that works, it displayed:

/apexpages/slds/latest/

On the page that doesn't, it displayed:

/_slds/

This makes no sense, but is happening. Any ideas? Thanks!

| improve this question | | | | |
0

I found the cause! The original VF Page used SF Api version 40 and the new one, version 47. I changed the new page to Api version 40, and now it looks the same.

Now all I have to do now is figure out how to make it look the same with Api 47 - I don't want it stuck with an Api from 2017!

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.