Digital Tool Factory blog - Page 9 of 34 - Backend web development in Atlanta GA Digital Tool Factory blog - Page 9 of 34 - Backend web development in Atlanta GA

The Digital Tool Factory Blog

How to fix problems with WordPress Front Pages not showing the proper template

The Problem

You are using a custom post type as the front page, and for no obvious reason it will not display in the custom template your wrote

The Cause

The front page always uses the font-page.php template in your theme, and if front-page.php is not present, then it will use the page.php template file.

The Solution

Create a front-page.php template file – it’s quite simple with that bit of missing information.


17
Oct 12


Written By Steve French

 

Tips and Tricks for running WordPress on Windows Azure

'factory at night' photo (c) 2008, Kazue Asano - license: http://creativecommons.org/licenses/by/2.0/I recently decided to experiment with Windows Azure, and here are some lessons learned about running WordPress on Windows Azure.  I wish I’d known these things before I started.

  1. Getting an install of WordPress on Windows Azure is as simple as they say it is.  Moving an existing site over to it can be challenging.
  2. One thing they do not tell you – while you can run up to 100 Azure Websites, which could be WordPress, on a reserved Azure instance, you only get 1 MySql Database.  As in one for the whole account.  The one you do get seems to be very nice.  When I first discovered this I almost scrapped the idea, but then I came across this blog post on using one MySql database for multiple WordPress accounts.  All you have to do is change the line

    $table_prefix = ‘wpGP_’;

    and you’re all set

  3. You cannot change the maximum upload size – it is set at 2 megs and that is all you get.  Since you are more less running in shared environment, that is not a bad thing
  4. However, I was moving my personal blog, which has been running for over seven years, and my initial import file was 14 megs in size.  I fixed this by splitting the 1 xml file into 19 xml files.  Tedious, but not difficult.
  5. Once all of the posts were in place it was a simple matter of migrating plugins and settings.  Quite frankly I was thrilled with the performance and responsiveness.

All good so far, but then I ran into the largest problem, specifically CNames.  Windows Azure uses CNames for EVERYTHING, which should not be a problem, but I hadn’t gotten around to moving that domain off of GoDaddy yet.  While it was easy to add a CName for www.moodyloner.net, it was NOT possible to add a CName for moodyloner.net.  This seems to be by design on Godaddy’s part.  I’m not sure why.  You can add a redirect of the domain in addition to changing the CName which is what I did.  Then you wait for two hours.

About a half hour in I lost my patience and moved the DNS over to Zonomi.  I was able to set everything up about five minutes and now I have a happy, responsive blog in the cloud.

Final thoughts about running WordPress on Windows Azure

I really like it.  The site is nice, fast, and responsive.  The permissions are configured properly out of the box and, now that I know all of these caveats, setting everything up should be easy going forward.


17
Sep 12


Written By Steve French

 

How to change the number of comments visible in the WordPress Admin

The Problem

'hiding in plain sight' photo (c) 2008, Kai Schreiber - license: http://creativecommons.org/licenses/by-sa/2.0/You have an old, established blog, and you left comment spam protection off (a tragic mistake).   I did this recently with one of my personal blogs and in very little time I had 15,000 comments pending in my spam folder.  I set about to delete the spam but found that I could only delete 20 at a time.  How could I change the number of comments visible in the WordPress Admin ? I looked everywhere in the option and settings and could not find anywhere to have the wordpress admin display more.  I even looked in the actual php files and could not find anything

The Cause

The option is actually hiding in plain sight.

The Solution

Click on “Screen Option” in the upper right” and in the box below “Show On Screen” and enter in however many you want to display.


10
Sep 12


Written By Steve French

 

Nashville vs Memphis, Silicon Valley vs Anywhere

'support' photo (c) 2006, Vladimer Shioshvili - license: http://creativecommons.org/licenses/by-sa/2.0/As always happens at the Atlanta Lean Startup Circle meetings, the after meeting conversation turned to competing with Silicon Valley for talent and money.

For some reason I was reminded of a conversation I had with influential harmonica player David Harp in 1998 (that actually was his name, strange coincidence).   It was more of rant really.  He listed off a long talented, groundbreaking, and just plain awesome musicians in all genres who moved from Memphis to Nashville over the years.

It was a standard grumpy old man rant about why his town (we were in Memphis, his hometown) had been cheated out of glory.  Then he said one thing that stuck with me, lot these many years.

Memphis produces ten times the musicians that Nashville does, both in quality and quantity.  Nashville produces ten times the infrastructure.  Talent will always move to infrastructure and never the other way around.

I think that sums it up nicely  The infrastructure in both cases consists largely of middle aged specialists.  It is far easier for risk tolerant young people to move to the risk averse specialists, which leads to a few specialized hubs, and a lot of farm team cities.


22
Aug 12


Written By Steve French

 

How to fix The model backing the context has changed since the database was created error

The Problem

You are coding away, and you get the following error

The model backing the ‘ctx’ context has changed since the database was created. Consider using Code First Migrations to update the database

This is my most frequent error when programming with Entity Framework asp.net .net mvc.  I usually only happens when using databases I do not have control over.

The Cause

Read this very good page for more info.

The Solution

Just add in this bit of code to your Application_Start() in Global.asax

Database.SetInitializer<MyContext>(null);

And you’re all set.


22
Aug 12


Written By Steve French

 

How to fix “type or namespace services does not exist in the namespace system.data” problem

The Problem

'Data Model Template - Excel spreadsheet' photo (c) 2009, IvanWalsh.com - license: http://creativecommons.org/licenses/by/2.0/
the cause is that you are using .net 4.0 code in a 4.5 project, to solve, just go to add reference, search type in system.data.services, et al and add them manuallyYou create a new .net framework 4.5 solution in Visual Studio 2012 and you start to use some sample code from the Windows Azure Data Market. You attempt to compile and you get the “type or namespace services does not exist in the namespace system.data” and your service will not compile.

The Cause

For whatever reason, System.Data.Services does not come over automatically when you create the solution. It seems that System.Data is in .net 4.5, but System.Data.Services is .net 4.0. The fix for this was so easy I never bothered to look into it further.

The Solution

Just right click on the solution, and “Add Reference”, and then type in System.Data.Services, it will appear and just select it. Bada bing, problem solved.


08
Aug 12


Written By Steve French

 

How to fix the “Unable to launch the visual studio development server because port 9452 is in use” error

The Problem

You are coding away, Visual Studio locks up for one of it’s many reasons, and reopen your project and run it again. You then get the “Unable to launch the visual studio development server because port 9452 is in use” error

The Cause

When Visual Studio crashed, the Web Server did not, so basically it thinks you are trying to run two instances at the same time, which is not allowed.

The Solution

Open up the process manager, go to the Processes tab, and select “WebDev.WebServer40.exe” and click “End Process”. Then try running your project again. Visual Studio will now start the project fresh and the problem should go away.


01
Aug 12


Written By Steve French

 

When challenging Goliath, do not arm wrestle

'Goliath and his bird' photo (c) 2007, hattiew - license: http://creativecommons.org/licenses/by-nd/2.0/I attended another enjoyable meeting of the Atlanta Lean Startup Circle last night.  It was a bit of a rambler of a meeting, but it was centered around making Atlanta more like Silicon Valley in terms of technology startups.

We wound up defining startups for this purpose as a company that is

  1. high risk
  2. high growth
  3. consumer focused
  4. in vital need of investment money

I don’t really keep track, but apparently Atlanta ranks low on both investors and startups that meet the above criteria.  We rank highly for quality of life issues, and our entrepreneurs are happy, but there are not many of them.   Getting more of them was the gist of the meeting, with the assumption that the investors would follow.

As always, the good thoughts happen on the drive home.    In particular the thought that Silicon Valley is set up to take advantage of startups as defined above.  Great!  I’ms glad that someone is.

Then I had the thought; why compete against Goliath at a test of strength?  Silicon Valley already has all of the risk based startups, venture capitalists, angel investors and assorted hangers on.  To wit, they are well stocked with the necessary evils.  We can try to go head to head, and lose repeatedly and badly, or we can build something new.  Why not have the South be the hub of bootstrapped, and lifestyle businesses?

There’s plenty of opportunity to go around, instead of trying to be the next Facebook, why not build The Internet of Things or wearable computers?  There’s no gold in old mines, and you can’t win (to the degrees that cities compete) when your opponent knows the rules better than you do.  Why not be the center of something else?


19
Jul 12


Written By Steve French

 

How to fix problems with Ajax Page Caching in asp.net mvc 4

The Problem

'Error' photo (c) 2008, Nick Webb - license: http://creativecommons.org/licenses/by/2.0/You’re using the otherwise awesome ASP.net MVC 4 and you can use an ajax function once, via the @Ajax.ActionLink tool, but you try it again, and it does nothing.

The Cause

For whatever reason the browser thinks it is a cache page and pulls it from the cache – I’m not 100% sure of this.

The Solution

Just add a DateTime.Now as a parameter, this forces the browser to send the data every time.


28
Jun 12


Written By Steve French

 

How to fix the “Handler “dotless” has a bad module “ManagedPipelineHandler” in its module list” problem

The Problem

'Software Bugs' photo (c) 2006, Martin Maciaszek - license: http://creativecommons.org/licenses/by/2.0/You are working away, using the wonderful dotless plugin for IIS, and also taking advantage of the great features of the Less Css System.  Then, for no good reason, your .less file stops loading.  You create all sorts of new Mime types and reboot the server, but nothing seems to work, how do you fix it?

The Cause

Upon closer examination, you uncover the following error

HTTP Error 500.21 – Internal Server Error
Handler “dotless” has a bad module “ManagedPipelineHandler” in its module list

even though you have not changed anything about dotless.

The Solution

At some point the application pool has changed.  Just change it back to a more recent version (I was using a custom application pool) and the problem goes away.


27
Jun 12


Written By Steve French

 




Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.