Archive

Posts Tagged ‘Troubleshooting’

Fix: WordPress administration UI content area showing up blank

Some time ago, at a WordPress 3.3 blog, a friend was getting a blank main area at the administration UI (just the menu was showing up there) when they visited the classic URL of the form http://somesite/wp-admin/. Here is a writeup of some notes I had kept while troubleshooting that issue and then upgrading to newer WordPress, with updated theme and plugins.

Visiting the problematic admin UI page online, I right-clicked and selected View Source in the browser and browsed to the bottom of it where it was showing: 

image

That div tag wasn’t not closed with a matching closing div. Obviously some PHP code that was outputing that tag failed at that point.

For starters, I copied all files via FTP (with the FireFtp Firefox plugin) from the remote server locally (into my Dropbox). Useful for backup too in case I messed up something.

Could use grepWin tool (http://stefanstools.sourceforge.net/grepWin.html) to search all locally copied php files for “contextual-help-sidebar” and see which one was outputing this (if that string was assigned to some variable could then search again where that variable was being used).

However, WordPress also has debugging mode, so I edited wp-config.php and uploaded the edited version to the server replacing the old file. I changed WP_DEBUG setting to true below: 

  image

At the problematic admin UI online page again, I right-clicked and selected View Source in the browser and browsed to the bottom of it, this time reading:

image

This led to indentifying the exact place in the PHP code that was causing this issue:

image

So, I commented out the buggy PHP code, converting it to an HTML comment block instead of a PHP block:

image

and the admin UI was working again after I pressed ENTER at the address bar again to refresh the admin UI (http://somesite/wp-admin/) and it was not showing up fine (F5 function key didn’t seem to really refresh the site when using Firefox btw, probably some caching issue).

Then installed (the free version) of the WP Database Backup plugin for WordPress:

http://www.wpseeds.com/documentation/docs/wp-database-backup/

by searching for “Backup” at

http://somesite/wp-admin/plugins.php

and evaluating the different backup plugins listed there (judging from both their votes and by checking out if WordPress wasn’t saying at the details page of a plugin that it hasn’t been tested with that [old] 3.3 WordPress version that was on that site) and backed up from Tools/WP-DB Backup menu:

http://somesite/wp-admin/tools.php?page=wp-database-backup

Then Downloaded the MySQL backup (.sql) file, so now I could update Themes, then Plugins, then update WordPress to new Core from

http://somesite/wp-admin/update-core.php

Did keep copies of the wp-content/themes and wp-content/plugins folders before and after updating them of course.

After WP updated, it asked to update the DB, all went ok

Then did backup up again the database via the WP-DB Backup tool and went again to

http://somesite/wp-admin/update-core.php

and installed an update for one of the plugins (can also do update per-plugin from http://somesite/wp-admin/plugins.php)

Then backed up again every file (db not included there) via FTP and done.

Advertisements

HowTo: Reinstall a new Windows 10 build after reverting to older build

At http://www.askvg.com/fix-windows-10-insider-preview-build-10240-not-appearing-on-windows-update/ it writes:

NOTE:

If you previously had a new Windows 10 build installed in your computer and then reverted back to an older build, you’ll lose access to the new build and it’ll no longer be offered as an upgrade option. Deleting the number for that build from the list at HKEY_LOCAL_MACHINE\SOFTWARE\
  Microsoft\WindowsSelfHost\Applicability\RecoveredFrom key in Registry Editor seems to restore the ability to upgrade. Thanks to our reader "thedicemaster" for this info…

This is useful to know and unfortunately it means that some users may get stuck to an older Windows 10 version. Unless Microsoft has it set like that so that they’ll get automatically the next Windows build (ship the one they were trying to install hoping it fixed the issue they were having). Of course this will work if Microsoft keeps on pushing new builds often, not if they end up updating the OS build once a year or more rare in the future as Windows 10 matures.

To open Registry Editor you can click the Search icon (next to the Windows Start menu icon) at the Windows 10 Taskbar and write RegEdit.exe, then it should offer you a result that says “Run command” that you can click to launch it.

Screenshot 2015-11-23 13.44.22

After that, expand the respective tree nodes (that is HKEY_LOCAL_MACHINE, then SOFTWARE, then Microsoft, then Windows, then WindowsSelfHost) from the side pane and right click and delete the “RecoveredFrom” node.

Then try Windows Update again from State menu / Settings / Update & Security and tell it again to check for updates. In case it still doesn’t offer the updates, wait for 1-2 days and try again.

Troubleshooting: Silverlight installation on MacOS-X

One of our ClipFlair Studio users reported on having some issue trying to install Silverlight on MacOS-X, so I gathered some related info below:

 


 

First of all, at the Silverlight installation webpage, at the System Requirements tab, you can find the following requirements:

  • Macintosh (Intel-based) Intel Core Duo 1.83-gigahertz (GHz) or higher processor with 512-MB of RAM
  • Macintosh OS 10.5.7+ (Intel-based)
  • Firefox 3.6+ or Safari 4+ web browser (note that Safari isn’t supported on Windows since it doesn’t support plugins I think)

 

If the Mac User already has Silverlight installed but has problems using the Silverlight component take the following steps in Removing Silverlight plugins on Macintosh:

  • Double-click the hard drive icon on your desktop
  • Find the plugin by Navigating to your Internet Plug-Ins directory: /Library/Internet Plug-Ins/

Remove the plugin by Dragging any of the following into your trash bin:

  • Silverlight.plugin
  • WPFe.plugin

     

    The Mac OS X 10.7 (Lion) and higher versions of Mac Operating Systems seem to have the feature called "Resume" which ensures that the Mac system will recall the state of applications and files just before you quit which would allow you to open them up again, and just pick up from where you left off.

    However, the "Resume" feature may be a stumbling block when it comes to installing Silverlight.

    Therefore, it might be a good idea if we turn off the "Resume" feature temporarily in order to install Silverlight.

    If you have a Mac OS X 10.7 (Lion) or higher version then:

    1. Go to System Preferences.
    2. Go to "General" Tab.
    3. Make sure "Restore windows when quitting and re-opening apps" is unchecked.

    After successful Silverlight installation you can go back and select that option again.

     

     


    Ensure that you quit all browsers on the Mac before the installation of Silverlight.

    1. From the top menu bar use Quit action to exit the browser. Do the same for all open browsers (e.g. Safari or Mozilla Firefox). Else see above how to set your system to not restore applications after reboot.
    2. Shutdown your Mac, and then start up your Mac again.
    3. Make sure all browser applications have been quited (don’t just close their open windows, you need to select the Quit menu action to close the browser process).

     

    After following the above steps, to install Silverlight do the following:

    1. Navigate to the folder where your browser places downloaded files.
    2. Click on the Silverlight installation file (should be a file with the extension .pkg or it might be file with extension .dmg which contains a file with extension .pkg)
    3. Run the installation (the .pkg file)

    HowTo: Troubleshoot .MSI installations

    Copying from Microsoft Web Deploy readme:

    If you encounter any problems during installation, you can run appropriate command listed below for your version of Windows to create a log file that will contain information about the installation process:

    msiexec /L install.log /I <path_to_msi>

    You can analyze this log file after a failed installation to help determine the cause of the failure.

     

    If you don’t have an .MSI but an .EXE, sometimes it’s a packed executable that contains an .MSI in it. You can right-click and open it with an archiver like WinRAR or 7-zip and extract one or more MSI files from there to troubleshoot them separately like above.

    Fix: The tag XXX does not exist in XML namespace ‘clr-namespace:YYY’

    I just had some big trouble troubleshooting the Visual Studio / XAML compiler error message:

    The tag XXX does not exist in XML namespace ‘clr-namespace:YYY’

    It turned out this occurred because I had a Silverlight library with Assembly name X and default namespace X (at properties pane), but was using it from a demo project with Assembly name X (again!) and default namespace X.

    If I removed the ";assembly=X" part from the XAML it worked fine, that is:

    xmlns:my="clr-namespace:X"

    Fixing the demo project to use Assembly name X.Demo and default namespace X.Demo (at its Properties pane), instead of having the same assembly name, now allows me to also use

    xmlns:my="clr-namespace:X;assembly=X"

    without problem.

    Seems that when you have multiple assemblies with the same name in a project (wonder how the filesystem supports that), all of them are loaded fine and if they have classes with namespace X in them, the namespace gets classes from both assemblies (that’s why the xmlns without assembly=… works). When you specify assembly name in the XAML of a given project, it assumes you mean its own assembly, not any other referenced one with the same name.

    BTW, at add references dialog I was using Projects option (to reference the output of other project in solution) and the project I was referencing was named X.Silverlight (can be named anything), I had not added reference the X assembly .dll file directly. Maybe that played its part too in the issue.

    There may be other cases too that can cause this error to fire up, see:

    http://social.msdn.microsoft.com/Forums/en/wpf/thread/56f933c8-a093-4c47-8e1a-cde4bb1864e9

    InitializeError Message: Failed to load a platform extension in Silverlight

    If you get an error like:

    Unhandled Error in Silverlight Application Code: 2153 Category: InitializeError Message: Failed to load a platform extension. Possibly corrupt or invalid file: …

    when you try to launch your Silverlight application (especially if you have the project set to use an autogenerated test page), you should read:

    http://forums.silverlight.net/t/185747.aspx/1

    In my case the suggestion to turn off “Reduce XAP size by using application library caching” setting at the Silverlight library project settings fixed the issue.

    I was using the internal Visual Studio development web server (Cassini), but some people at the discussion thread above also say it can occur in IIS7, with the problem actually being in compression settings (need to turn off option "Enable dynamic content compression”) and they point to the following discussion:

    http://forums.iis.net/p/1164340/2023839.aspx#2023839

    What to do if Generic.xaml doesn’t get loaded for WPF control

    Just came across http://wangmo.wordpress.com/2007/09/27/themesgenericxaml/ which gave me a hint on why a WPF control wasn’t getting instantiated correctly when loaded from an external assembly (dll):

    to load generic.xaml for WPF, at the start of Properties\AssemblyInfo.cs you need (note this isn’t used/needed in Silverlight):

    using System.Windows;

    and at the end of Properties\AssemblyInfo.cs you need:

    [assembly: ThemeInfo(
    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
    //(used if a resource is not found in the page,
    // or application resource dictionaries)
    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
    //(used if a resource is not found in the page,
    // app, or any theme specific resource dictionaries)
    )]

    Mind you that if the project doesn’t show a Properties node in Solution Explorer, you have to either make a new project using the correct template (for a WPF custom control), or right click the project, select Properties, then press the Assembly Information button and enter some dummy values, then OK to create the Properties node (which also creates to a Properties subfolder and AssemblyInfo.cs file).

    You can expand (drop-down) the special Properties node in solution explorer then to open AssemblyInfo.cs and add the above stuff if missing.

    %d bloggers like this: