0

I have created two web sites. One is "production" and the other "dev". Each is a virtual host and both are on a single server running apache. Both sites are loaded with the same code base: WP 3.5.1, a base theme and a child theme. This is not a multi-site setup; just two sites loaded in different directories.

The page in question uses a page template. In the page template there is some switching in PHP code to choose what to display. The switching is based on the $current_user->ID. If ID is null or zero display a logon block otherwise look up some data to present.

This works fine on the dev site. It does not work on the production site. Something is different. I checked .htaccess, the virtual host declaration in apache, and the settings for WP and the theme. They all appear to be the same. I have run delta checks on the code and the two sets of files are identical.

What other config settings might be in play here?

10
  • Is the production database a clone of the dev database? Also, it might be helpful if you posted the code that is not working.
    – epilektric
    Aug 26, 2013 at 3:28
  • Yes, the dev database is a clone of the production site, new code was pushed from dev to prod. Happy to do so, but it is long so I will set up a link to the code.
    – Mophilly
    Aug 26, 2013 at 3:54
  • Here is the code snippet. It is long because I am not convinced the problem is in the code, but open to new info so err on the side verbosity. pastebin.com/hF2VCPLv
    – Mophilly
    Aug 26, 2013 at 4:12
  • I doubled checked the php info. Except for the urls and hash codes, the two sites report the same details.
    – Mophilly
    Aug 26, 2013 at 14:52
  • 1
    Many thanks to @epilektric for making suggestions. I will check the comment closures. However, PBKAC: the page template was not assigned to the target page in the prod site. Such a dumb error; one I thought I checked. I will now slither off to a dark corner and reprimand myself.
    – Mophilly
    Aug 26, 2013 at 18:43

1 Answer 1

0

After walking through the code and examining everything else, I (finally) revisited the page definition in the Dashboard. There I noticed that the page was not associated with the page template I was working with. I assume that during the migration from the development web site to the production web site, the association went missing.

FTR, "PBKAC" stands for problem between keyboard and chair.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.