Magento CSS cannot be updated - php

I'm Trying to replace my style files with new files that have been implemented on another machine, but nothing changed
I Flushed all caches (images and CSS) , Disabled Mergeing CSS Files and run the compilation

Without knowing what files you have overridden and your current theme design this will be hard do debug, but one this I can suggest doing is to disable all caches, disable merging and disable compilation. This should help you to see if you are changing the correct files. If after this step your changes are not being made then you are changing the wrong files.
After that what you can look at doing is simply updating the file you think should be called and adding some weird css like adding a green border around everything, but obviously this is not great on a live site so you could but in place a maintenance page to all up your own ip.

Related

.tpl file not updating when changes are made

I have been given a massive PHP e-commerce website to work on that is already mostly built, but I am currently having an issue regarding .tpl files. No matter what changes I make to the files, when they are saved the server will not update them (the files are staying saved, not reverting back to previous versions). My CSS changes and changes to PHP files are working but the core code within the .tpl files just doesn't want to play. I have seen a lot of places on the internet regarding these files in relation to something called smarty but I have not seen anything relating to that in this project and have just hit a brick wall.
After logging as Administrator, go to Configuration -> Performance -> Clear Cache
Click on Clear All Caches.
Once the Caches are cleared, the changes on the Template (tpl) files will be reflected.

OpenCart .twig file not showing changes

I've been trying to change the product/catalog.twig file, to remove some unnecessary buttons such as the "add to wishlist" and "compare product" options, which are just useless for the store I'm attempting to make.
On the theme editor, I've removed the two buttons from the .twig file, yet the changes aren't showing on the store. I've heard it might be an issue with caching, like it's bringing up the old site. So I deleted the cache from the storage folder, yet the problem still persists.
In OpenCart 3.0.2.0 there is button with a gear icon in admin dashboard. It open up a modal that allow you to clear cache or disable cache.
First of all, Its better to use the OC's builtin Theme Editor to make any change in any template file. In-case you want to change something directly using FTP Client or a file-manager, you must know the OpenCart Structure a little :-)
Anyway, bellow are the few things that can be helpful for anyone looking for the solution.
1) You have enabled the cashing, you can clean it as described by #DigitCart - Alternatively, you can clear all the files in following folder YOUR_STORAGE_DIRECTORY/cache/* (Don't remove the cache folder)
2) Probably you are trying to make change in a file that is modified previously by an Extension, You can find the modified files under YOUR_STORAGE_DIRECTORY/modification/* You can make a small extension and install it through Extensions > Installer to make changes in these files. OR, you can change these files directly via FTP, but its not recommended.
Sometimes, depending on the file you want to edit, you have to Rebuild The Modification Cache. Simply go to Extensions -> Modifications, and click the "Refresh" button at the top of the panel.

Wordpress Admin doesn't load css files and images

I'm having a serious problem. I have wordpress 3.9 installed on my server. the problem is that my website front end loads good, but my back end just loads text :
I have updated/reinstalled wordpress but nothing has happend. What should I do?
Thanks for help.
I'm 100% sure that if you simply do the following, you'll figure out what's wrong and fix it.
Deactivate all plugins without use of your WP-Admin.
Activate them, 2 or 3 at a time, and determine which plugin is the culprit
If none of these plugins are the culprit, go to the WordPress site and download WordPress. With an FTP utility such as FileZilla or another client if you already have one, then upload the entire wp-admin folder to your server, overwriting older files.
Your WordPress admin will be fine after these steps. And of course, never alter any core WordPress files -- ever. The only files you should ever tinker with are files in your child theme, which is something you should be using.
Would be great to have a bit more information about this topic. First of all: Is this a new problem respectively did the admin run without errors before? (3.9 sounds like the page is not a new clean install).
Usually I would start debugging the page via e.g. firebug => Check the Stats of the CSS-Files.
If they load correctly (200) check if they are empty or incomplete (Incompleteness can be checked via diff against the original file ... most IDEs will handle that for you)! If they aren't you have probably just diabled CSS in your browser for the URL of the admin-panel.
If they don't load, try to check why! If the files exist its most probably an error in your .htaccess (wrong rewrite, blocked directory, etc.).

Magento custom category widget not appearing on stage server

I followed this (first comment),
magento - category name and image in static block? to create a simple widget to display the category image and title from a static block on a CMS page. It works fine on my local MAMP version of Magento Enterprise 1.13.0.2. It's not working however on the stage / test environment Magento 1.13.1.0. (ubuntu).
It doesn't error, it's as though it's ignoring the template file (info.phtml). When I reverted to the default theme I realised I had to copy the template files to the default enterprise folder to get it to work but it did (local version). I have made sure that the template folders are in each of the themes, base, enterprise (default), MyTheme (default (which is enterprise default) & (MyTheme / MyThemeVariant)).
The only setting / configuration that appears to be different between the local and the stage is that pretty url's aren't working on the local. I have looked into the htaccess and it still isn't resolved. On both versions the native Category link Widget isn't working but i'm not sure if that is relevant.
I have disabled any extensions turned the cache off and cleared the index. Still nothing.
I have been looking for the answer, retracing my steps, altering and changing back any setting(s) I think may be relevant for 3 days now so i'm well stuck. Anything anyone can offer to try I will give it a go.
So in Magento Enterprise there is also a full page cache that you can access via the Magento Admin here : System->Configuration->System->advanced->External full page cache settings.
On the page System->Cache management, as well as disabling all the caches you should flush the Magento Cache and the Cache Storage.
You might have a 'cache' called Redis or APC, but I don't think that affects .phtml output. and if you can access the Widget in the back end I don;t think those items are the problem.
Your webserver might have a full page cache such as Varnish but I don't know how to use it or turn it on or off.
Theoretically your webserver headers might be saying 'this page doesn't update so internet providers can store local copies in their caches' - but I would be astonished if that was the case (inspect your header and inspect the Cache-control Expires and Last-modifed headers if you want to eliminate this possibility).
Your browser might have it's own little cache (which you can clear from your browser settings).
If it isn't a cache problem, in my experience .phtml files get skipped if they have PHP errors in them but you have it working on your local dev server. Could it be a file permission issue? Could it be a setting in the widget on your server that is not handled by your widgets .phtml? As alast resort, try changing your widget .phtml to a really simple file like <?php echo('test PHP output'); ?> and see if that renders - try putting the widget on different pages (ie new pages that won't be cached anywhere) and see if that get's everything through.
Could you have a namespace conflict with another module? Eg an XML file is changing your widget block XML name that sets the .phtml template? Does your widget.xml file declare <supported_blocks>...</supported_blocks> which might be excluding the block into which you are trying to render the widget?
What else? You mentioned this widget displays category information: Are you referring to a category that exists on your staging server? It will probably have a different category ID than your dev server and / or check the category is visible in the website and store.
Okay, I think I am out of ideas now.
The problem was that "Block" php file's first letter was lowercase. I changed it from info.php to Info.php and now everything works as expected.
This has been the single most frustrating investigation yet into Magento. The only thing I hope is that it saves someone a whole load of pain.

Magento file changes not taking effect and flushing cache

I'm copying a Magento Enterprise 1.11.2.0 core file called Preview.php into the local folder with same directory structure to override this particular file because it is not functioning properly. More specifically, it is not allowing the transactional emails to be previewed. I made changes for a fix in the .php file that goes in the local folder, but Magento doesn't seem to think there are any changes. I even tried modifying the core file itself to additional garbage strings appended to the returned variable, but that didn't register either.
Now, as I understand it, I need to flush the cache, but I don't think I'm doing this properly for these changes to take effect. In the Cache Management section, I've tried "Flush Magento Cache," but I have not tried "Flush Cache Storage" because I was told not to touch that from the person who set up our installation. What are the differences? Could flushing the cache storage make the overriding preview.php kick into action?
ADD:
The directory structure is correct. As I mentioned, some files (while others take effect just fine) changes is not recognized by Magento installation for some reason.. One of our guys thinks maybe it's one of the extensions we're using that is overriding some portions, but I really don't see anything that's overriding the core app files or images in the skin folder.
For example, if I delete "logo_email.gif" in the theme folder we're using, it should fall back to the default Magento logo image. Instead, the Magento instanace thinks the file is still there and even loads it! I'm forced to create our own logo file called logo_email.png and load this file in the email templates, because deleting or overwriting this file doesn't work.
I've submitted a support ticket to Magento.. I will update if I make any progress.
I believe the culprit was the Magento compilation feature, under System -> Tools. Disabling this allows for the code changes to take effect!

Categories