Code changes not taking effect on Drupal site - php

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.

Related

Wordpress homepage changes not works

I have a wordpress website, I created a customized php template to the homepage and loaded from the back-end in the template page settings.
During the last months everything was working perfectly when I change anything to the template code effects the homepage without any problems.
Suddenly, yesterday when I tried to upload a updated file, nothing changed on the homepage.
I remove the browser cache, and wordpress cache, used another device to check, without any luck.
The wordpress black admin tools bar appears on all sites pages so I can edit and control this page, but it's not appears on the homepage.
For sure I checked again the theme settings for the homepage and page template settings, and everything is correctly configured.
I tried to activate another theme, the surprise that I found the homepage still the same and all other pages changed to the new theme.
I am losing my mind due to this, and I don't understand what may happened.
Download your site on your computer and see whether it happens also on your own computer when simulating with XAMPP.
Are you sure that the new added files are really being uploaded to the server? did you check it up with downloading the files? Maybe the modified files could not been uploaded? Another thing would be that some new installed plugins are making those problems. Have you installed some new plugins like a plugin which are speeding up your wordpress site? There are some popular plugins which speed up your site with caching your whole site and working as a CDN.
Since i dont know which modification you do on your website it is difficult to find a solution. If those modifications are changes of articles then look into the database.
You could look into the SQL Database whether those new information are being saved. E.g. you try to post a new article. Is this article being saved in the SQL database? Do you see any errors on the page? Does this effect each page / section of your website or is it only for a specific module e.g. "image uploader"??
Did you try to replace a simple image on your site with another image ? Can you see the difference on the website? I would start with little steps to be sure whether this is a server issue, template issue or sth with unsufficient priviliges. There were also new wordpress updates, maybe they affected your template? Another thing would be to recover your complete site from a backup and see whether it works like before and be sure that your site has not been hacked.

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.).

Wordpress blank page after activating theme, but works in other server

I'm trying to activate a Wordpress theme but all I got is a blank page, also the admin page goes blank.
Version of WP is 3.9.1, Mysql 5.1 compatible and PHP 5.2.4 compatible too with WP. The theme in question is MH Magazine and I have it in another server with the same configuration and is working ok.
Even I tried to do a backup of the working site and place it in the production server and still goes blank.
I tried uploading the max_memory_limit in php and no luck. Error log and show php errors doesnt show anything, when I check only says the site name HTTP 1.1 500 - If I set wp_debug to true says HTTP 1.1 200.
File permissions are ok too.
A SIMPLE FIX FOR NON TECHIES (Like me really)
Loads of forums recommend various code changes and things to try, non of which worked, so I logically worked through the process more simply and solved it myself (in my case). White screen for everything, including front end and Admin. I tried everything going!
Essentially I'd asked Wordpress to link to a theme, which it did, but now I can't change it back. As it wouldn't automatically switch back to default themes, as suggested by others as a result of simply deleting the theme folder via ftp, I would have to force that myself. Without access to the admin panel, how would I change the link (easily)?. Well I can't, so instead I need to force the change of what it links to instead!
In the end I basically logged in via FTP, went to the wp-content folder, then to themes, located my list of theme folders and changed the theme folder name of the one recently selected and causing the issue, by just adding an x at the end (random letter). Then I changed the theme folder 'default' to the name of the theme which was causing the issue, then refreshed my site in the other window, at which point it displayed again. So the hard coded link never changed, but the basic files it links to now have.
The site was now back up, thank god! I then logged into the Wordpress admin panel and updated my version of Wordpress, as to be honest it had been a while and it was a little out of date, so a likely culprit for the cause of the error. Once updated, I then went back into the FTP window, renamed the folder back to 'default', and then removed the 'x' character from the end of the actual theme folder that I wanted to use. And ta dah, it now works beautifully with the theme I wanted! Without any fancy code changes or messing around with reinstalling or removing etc. BOSH!!
Hope this helps a few people out. (obviously it's different strokes for different folks)
To get this out of comments --- this is a community wiki answer.
Are your two servers running on the same platform (Linux? Win?) or different ones?
Do you have the same collection of plugins on both platforms?
Here are some things to try.
do View Source on your white screen of death and see if there's anything in the source view that can help you diagnose your problem.
deactivate all your plugins, then try the theme.
if it doesn't work, then this theme is broken on this server setup.
reactivate the plugins one by one. One of them will probably give you the white screen of death. Then you know that plugin is incompatible with that theme.

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.

ezPublish Translation mixup

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.)

Categories