Prestashop - no bootstrap in backoffice - prestashop

What is the problem
I recently gave theme support access to backoffice, but all they did is nothing and messing up my backoffice.
I'm using Prestashop 1.7.6.0 (and for some reasons I can't switch to newer version, so update is not an option). Everything was fine, but now I discovered that some backoffice pages (products, brands, attributes) are totally messed up. Looks like it lacks bootstrap, but I have no idea how to make it work.
As far as I know they were supposed to turn on SSL, but looks like domain still lacks certificate. Maybe because of turning it on, everything is messed up?
I have turned off cache and cache/smarty/ catalogs are clear, except index.php file.
Things I did:
Console showed 4 errors. They were about missing fonts (404 error), included in theme.css (see below).
#import url(//fonts.googleapis.com/css?family=Open+Sans:400,400i,600,700);
#import url(//fonts.googleapis.com/css?family=Ubuntu+Condensed);
#font-face {
font-family: Material Icons;
font-style: normal;
font-weight: 400;
src: url(e79bfd88537def476913f3ed52f4f4b3.eot);
src: local("Material Icons"), local("MaterialIcons-Regular"), url(570eb83859dc23dd0eec423a49e147fe.woff2) format("woff2"), url(012cf6a10129e2275d79d6adac7f3b02.woff) format("woff"), url(a37b0c01c0baf1888ca812cc0508f6e2.ttf) format("truetype")
}
.material-icons {
-moz-osx-font-smoothing: grayscale;
I found all included fonts in admin/themes/default/public and copied them to admin/themes/new-theme/public
Errors disappeared from console. It repaired icons, but problem still occurs:
Where troubleshooting led me
theme.css on broken subpages is incorrect. Even if I don't have any cache and tried using private tab couple times - it does not match real file on FTP.
Here is screenshot of theme.css from sources tab on broken page:
And here is confirmation of same file with different content in FTP:
I don't have any caching on server - nothing!
Also when I copy correct theme.css content into wrong one in sources page (which is supposed to be correct, because it's same file!) - subpage is 100% working in a flash. Unfortunately only local.
I even tried to attach this file via direct URL, as you can see in screenshot below - it didn't helped. (Highlighted line is original link rel, which leads me to good path file, but still with wrong content).

Have you tried to clear the cache after turning it on the SSL? — it can also cause the problem.
At first glance, it looks that have bootstrap loaded, but some other CSS is not loaded correctly.
If you look at the console window(F12), you can see the resources the page could not load. That might help to diagnose the problem.

After founding out that theme.css is different (still curious how it changed itself) and trying to replace it - I finally tried to remove it from FTP. After that I again cleared all cache, visited broken site without any CSS and then uploaded new one.
Maybe it was about some update or other stuff. However I copied theme.css from theme/default/public and placed it in theme/new-theme/public.
Now subpages are working correctly.

Related

Bigcommerce custom images from Stencil

Firstly, wow, Bigcommerce's own forums are dead as heck, huh?
Anyway, I've been working on my theme locally within stencil and for the most part it's been going fine. I did add a grip of images to the /assets/img directory that are displayed by category.js under certain conditions, which worked great when I'm serving from localhost but when I push the theme to Bigcommerce from the commandline (using 'stencil push') these images (and a couple custom icons, etc) are broken. I read the docs that warned me to make sure any added directories have the proper permissions but 1) this is an existing directory and 2) i'm getting a 404 anyway so it's not like they can't be accessed, they're just not there at all. Clearly Push isn't bundling them up, which means I'm doing something wrong.

Page resources could not be loaded by Googlebot

When I check my website URL on Google URL inspection tool it shows that page resources could not be loaded i.e image, stylesheet and script files. However, my website is working perfectly on a live server and the website is not rendered properly by Googlebot smartphone. I have tried everything to remove these errors but nothing helped. I have also checked that these resources are not blocked in robots.txt file.
Screenshot of page resources error
I've been struggling with this for a couple of days now, and finally reached the only solution that has worked for me. In my case, it wasn't a robots.txt problem, as I believe that you've already checked before posting this.
The problem has to do with the number of resources Googlebot is willing to fetch before giving up. If your CSS and JS files are too many, or too big, Googlebot gives up before fetching all of the resources needed to render the page properly.
You can solve it by minifying your files via a server mod, or via plugins like WP Rocket or Autoptimize. If you have too many CSS and JS files and the problem persists after minifying, try combining these files as well by using the same plugins.

Insecure font blocking my https website

Dear stackoverflow experts,
I've been reading in stackoverflow forum about the issue but didn't find a solution
I'm experiencing a problem with my website https://baliradar.com
since I installed SSL. I changed all the http links by https.
However I cannot resolve the problem of insecure font though, here's the console log error message:
Mixed Content: The page at 'https://baliradar.com/' was loaded over HTTPS, but requested an insecure font 'http://fonts.gstatic.com/s/lato/v11/nj47mAZe0mYUIySgfn0wpQ.ttf'. This request has been blocked; the content must be served over HTTPS.
I have been searching for hours with FileZilla in the files of my theme "winning agent pro" and in other directories of my website but I never found the html code for the font. I tried to search for specific keywords ("fonts", "gstatic") in my File Manager from my CPanel but there's no records found.
I also tried to use the "Developer Tool" of Chrome to find the source of the font without success.
I'm clueless here and was wondering if someone has an idea or a solution?
Thank you for your time.
Xavier
There are several http:// links in your CSS code, which is linked in your header as <link
rel="stylesheet" type="text/css" href="https://baliradar.com/wp-content/cache/minify/000000/e4a39/default.include.08bf2a.css" media="all" />:
.mCSB_buttonRight{background-position:-80px -56px}#font-face{font-family:'Lato';font-style:normal;font-weight:300;src:local('Lato Light'), local('Lato-Light'), url(http://fonts.gstatic.com/s/lato/v11/nj47mAZe0mYUIySgfn0wpQ.ttf) format('truetype')}#font-face{font-family:'Lato';font-style:normal;font-weight:400;src:local('Lato Regular'), local('Lato-Regular'), url(http://fonts.gstatic.com/s/lato/v11/v0SdcGFAl2aezM9Vq_aFTQ.ttf) format('truetype')}#font-face{font-family:'Lato';font-style:normal;font-weight:700;src:local('Lato Bold'), local('Lato-Bold'), url(http://fonts.gstatic.com/s/lato/v11/DvlFBScY1r-FMtZSYIYoYw.ttf) format('truetype')}#font-face{font-family:'Lato';font-style:normal;font-weight:900;src:local('Lato Black'), local('Lato-Black'), url(http://fonts.gstatic.com/s/lato/v11/4cKlrioa77J2iqTqBgkRWg.ttf) format('truetype')}.currencyr{position:fixed;z-index:2147483647}.currencyr .currencyr-container,
As it seems that this is a minified version of your css, search in your current theme's css-files for the http phrase. You can do so using grep for example:
grep 'http://fonts' * -R
In my case, this issue was caused by my caching plugin (W3 Total Cache). Disabling it solved the issue but you may want to keep the plugin and change the font URLs in the CSS file from HTTP to HTTPS.
I came across this issue when the Social Pug plugin stopped showing
icons on the social media buttons. The root cause was the caching
enabled by W3 Total Cache plugin. If you are in a similar situation,
there are three ways to fix the issue:
Disable W3 Total Cache (not recommended because your website’s performance may decrease)
Change the font URLs of Social Pug plugin to HTTPS
In some cases, URL Rewrite rules may cause this issue. Check your .htaccess file
Mixed Content: The page was loaded over HTTPS, but requested an insecure font

Why AppCache not used when online?

I'm developing a Web App using the cache manifest to be offline.
It's working fine, but I tried to add a no-cache directive in Apache for one of the file (the js one), to be sure the last version would be loaded each time I change the manifest file.
But actually, the js file is now reloaded every time (when the device is not offline, of course), although the manifest file did not change.
I tested it only on Safari and WebKit.
Is it the normal behavior ? I thought the manifest directive would supplant the apache one...
EDIT :
Actually, I disabled the apache no-cache directive, and my js file is still reloaded every time, despite the fact the manifest is not modified.
I don't understand. A few days ago, this JS file would never reload, even with manifest change, and now it's reloaded every time (except when the device is really offline)
So it's not really a question anymore, but maybe you'll have a lead for me...
I just read a good article on this subject.
http://www.webdirections.org/blog/appcache-not-so-much-a-douchebag-as-a-complete-pain-in-the/
It's a very particular case, but in case it happens to someone else :
I tested on Chrome, and I was working normally. So on safari, I emptied the cache, and everything return to normal. On my iPhone, I switch to airplane mode, load the site, and go back to connected mode, and it returns to normal too.
So I assume some cached files were corrupted, causing Safari to load the files each time, without issuing any error... :(
I'm not completely sure, as it was like a "phantom bug". But in case it helps.
EDIT : after further investigation, it appears the corruption came from the fact I tried to add a parameter to my jsfile, ie my file.js?v=xxx
Everytime I tried to put it back, with or without reflecting it in the manifest file, it came to this bug/strange behavior...

Caching issue with LESS.js when used with Initializr

I am about to start a new project that requires a responsive design solution and I'd also like to take advantage of LESS.js for the styling.
I downloaded the Responsive template from Initializr and set it up as a new site on my localhost. I have begun making minor tweaks to the index.html file to begin styling the page up as it would be required for my project. I began by adjusting the width of the .wrapper class and was frustrated when my changes did not appear to be making any difference when viewing in the browser.
However upon changing the name of the folder containing the files and amending the URL, my changes appear, so there is obviously some sort of caching issue when using LESS on Localhost.
Does anyone know of a solution to this?
What worked for me was disabling, or deleting, cookies of the domain on which you're developing.