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.
Related
I'm sure this has been asked a dozen times here, but nothing I've found online or on here has helped. There's something strange about the Drupal site I'm currently working on - I've worked on 10+ other sites at this company with no problem - in that none of the code changes I make seem to have any effect. Anything I do through the admin backend appears immediately, but when I try to change the text in a custom page template and push it live, nothing happens.
What I know/did:
I know I'm pushing correctly because when I go in the file manager on the live server and look at the files I pushed, the changes are present.
I am sure that I am changing the correct file because when I try it locally and on our staging server, the corresponding pages update immediately.
I cleared out the site's cache in the admin menu, in Configuration -> Development -> Performance -> Clear all caches.
I asked the hosting company if there was a cache to clear on their end, they said no.
I deleted the uploaded theme from the server completely. The theming is still present, though the images are broken links. So the site theming is still cached somewhere. (I then replaced the theme folder)
I then contemplated quitting web development and opening an orphanage in Pakistan
What I did not do:
I did not run root/update.php. I figured this would recache the database and that wouldn't affect text in a custom page template (I also searched for that original text in the database to make sure).
Does anyone have any other ideas I could try?
It could be nginx cache on the server. Or PHP opcache could prevent you from seeing PHP code changes.
But if you still see deleted Drupal theme, it is rather some proxy or maybe something right in your browser instead of the server.
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.
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.
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!
I'm trying to create a development mirror site of an ezPublish site so I can stage changes without messing up the main site. I copied the database and the filesystem and changed the ini files to point at the new database, but when I loaded the page I found that none of my objects were being loaded. So I break out the debug bar, and I find that for some reason the language_mask that is being used is incorrect...the bitfield is set to 4 while the mask being used in the query to load the page is 3.
So I poke around the ini files and I see a setting called SiteLanguageList[] which seems to set up 'backup langauges'. I found that If I set SiteLanguageList[] to:
SiteLanguageList[]=eng-US
SiteLanguageList[]=eng-GB
and my site started showing up. Yay!
However, all is not well. When I actually try to EDIT the page in the admin, every entry shows up blank. What makes things doubly weird is that it shows up in the admin as long as I'm merely looking at it. And then there's this weird discrepancy, where depending on where I'm looking in the admin, it either says that the page is eng-US or eng-GB depending on where I'm looking on the same page.
Seriously, what the heck is going on here?. If I click the edit button, nothing shows up.
Same question on ez Publish community
Are you sure that the database
was imported correctly? Please check
the database using "Setup - Upgrade
check" utilites
Clear all caches
manually (run "php
bin/php/ezcache.php --clear-all"
from ez root directory)
Check the
ez error log
(/var/log/error.log)
Check the permissions for the ez
folders (cache, settings, etc.)