Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Wordpress Upgrade Theme Problem

Posted on 2011-09-02
11
Medium Priority
?
386 Views
Last Modified: 2012-05-12
Ater installing the latest wordpress (3.2.1),  a custom theme is now broken.  It's probably obvious, but I can't seem to find the obvious here.  A graphic is displayed per post and clicking on the post's title puts up that post with the image displayed as well.  However,  when I click on the "previous posts" on the bottom the resulting page has that missing picture "X" icon displayed.

I examined the image tag and the paths are the same.  Perhaps some pathing information was not upgraded with the WordPress Upgrade.

Please advise.
0
Comment
Question by:Howard Bash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
11 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 1600 total points
ID: 36476921
When you click previous posts, does the post itself display and the image is gone?  Or is the whole post gone?

Which version did you upgrade from?

Can I see a link for testing?
0
 
LVL 1

Author Comment

by:Howard Bash
ID: 36476929
The content is there, just the image is sometimes missing.  I can tell you that the URL changes to myyrl/page/2 when I attempt to go previous page of posts.  

When the page renders without the image (the "X" icon),  I can click on a listed posts title, go to the page with that post as the only post of the page, and the same image is displayed correctly.

The old version was way back there and was full of problems.  I think, no kidding it was, 2.3.1

0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 1600 total points
ID: 36476938
>>  I think, no kidding it was, 2.3.1

Ack, that's what I was afraid of.  From a version that old, the custom theme probably was using older, now deprecated, functions to call the posts and the newer version of WordPress breaks the old functions and causes the problems.

It's not going to be something you fix through the Dashboard.  You're going to have to go through the theme and check where this pagination is happening and update the syntax
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:Howard Bash
ID: 36476965
Here's what I found.  The index.php file had the image url as filenameA.gif  and another as filenameB.gif.  I added "/" in front of each and they now work.  Ok fine and dandy.  However,  what changed on the upgrade/moving site to faster server?  Did some web site wide setting get missed,  like leaving a folder off a path variable?
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 1600 total points
ID: 36476972
Without seeing the theme and the environment for myself, couldn't tell you.  Might be the older server had an environmental variable set that negated the need for the initial slash and the new environment doesn't have it.  Or the older WordPress instance wrote paths differently than the newer...
0
 
LVL 1

Author Comment

by:Howard Bash
ID: 36476991
I'd bet more on the change in environment.  The URL is really hardcoded in the php file and so I wouldn't think changing versions of WordPress would affect finding the src of an img tag.
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 1600 total points
ID: 36477026
Your initial post made no mention of an environment change, so you had me going in the wrong direction :)

>> I wouldn't think changing versions of WordPress would affect finding the src of an img tag.

Yeah, but if the template was using <?php bloginfo('template_directory'); ?> to write the path instead of straight out hardcode, it could have mattered.  Again, without seeing the site or the code, I was throwing out my best guess.
0
 
LVL 1

Author Comment

by:Howard Bash
ID: 36481063
Is <?php bloginfo('template_directory'); ?>  interpreted differently now?  I ask since the theme was moved as is.
0
 
LVL 31

Assisted Solution

by:gwkg
gwkg earned 400 total points
ID: 36583003
Is <?php bloginfo('template_directory'); ?>  interpreted differently now?  I ask since the theme was moved as is.

No: http://codex.wordpress.org/Function_Reference/bloginfo

WordPress wouldn't make a change that would break millions of sites.
0
 
LVL 1

Author Comment

by:Howard Bash
ID: 36594068
I definitely had to make changes in how the images got referenced.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question