Wordpress- Bugged theme help/ advice

Soldato
Joined
18 Jan 2006
Posts
3,140
Location
Norwich
I look after my father's small wordpress site (Fix it when he breaks it essentially)....

At the minute, he's stuck on 3.5.2, as anything later than that seems to break the media uploader when using his default theme.

I ran into a bug with the image slider plugin in use, which made me think again of upgrading the WP version.
I've had a brief look into the theme contents, and it appears to have started life as a very badly hacked about version of a paid theme of some description.
CSS and PHP code is all over the place, and there's all manner of junk.

Couple of queries from those who've done this sort of thing before:
  • Any tips on debugging the broken media uploader? It's something in the theme (Not plugins), but I've not really got any experience of PHP debugging; In C# I'd just stuff a breakpoint on the button click and start digging...
  • What would I (we) expect to pay as a ballpark figure in either cash or hours to either fix this, or start again & recreate from scratch?

The site is relatively secure, but I'll admit the old WP version makes me itchy....

-Leezer-
 
It's not that secure if he's still on WP 3.5 and if the theme has been hacked about then there's no knowing what vulnerabilities are hiding.

I'd go with a start from scratch considering you say the site is small. You can grab a decent new theme for £30 and be up and running quickly.
 
Are you talking about the media uploader in the back end? Not sure how a theme could cause issues with that. Have you enabled the default theme fpr that wordpress version to see if it has the same issues?

I don't do Wordpress if I can help it, however if ModSec is turned on, it can cause issues with the media uploader I found. Might be worth a look. There are ways to allow that particuar thing through via the host if they're any good, I just can't remember what when where right this moment.

You might be bale to fix by spotting how the default theme for that Wordpress Version calls certain aspects that might cause the current theme to fail. I should expect any PHP errors are in the servers error logs.

Given the site is as old as the Wordpress version, it might be best to start over. I doubt anyone would take it on to make it work, it would be more effort than starting over I think.
 
I'm well aware that it's insecure, although I've locked down everything I can find, and comments etc. are off :)
The theme is (according to him..) essential, so it's not likely to change, other than being re-created. IIRC the theme itself cost about £500 to be designed/ created, plus a couple of hundred more for the site.

Media uploader works OK with the default theme, so it's definitely something in the theme itself.
All I can really say is that clicking on the button doesn't do anything, so something isn't triggering somewhere.

OptionTree interfering somewhere would be my instinct, but this simply isn't my area of expertise for debugging, and it really doesn't help that the code is a mess which I don't understand fully...

Incidentally, don't talk to me about server error logs :(
Currently with Vidahost, and support here has totally gone from a few years ago, and the last foreigner I spoke to had no clue what a 403 error was, let alone how to access them....
(If the cloud hosting gives a list of 403's generated, I haven't found it. At least cPanel lets me see them if support are being useless)

-Leezer-
 
I understand the reluctance to throw away a bespoke theme, but you didn't exactly sell it when you described it as all over the place and junk.

Nevertheless, if you want to find your issue I imagine it's JS related. I'd check your theme for any new scripts being used in the admin area, https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts.

It could be CSS if you've accidentally overridden the display of a modal window or similar, but I think WP 3.5's media uploader still took you to a new page first?
 
Oh I agree :p
If nothing else, it looks quite decent!

There is bespoke and bespoke, and whilst I don't know much about Wordpress, there's unused stuff littered around the theme (Large numbers of 'copy' and 'backup' files, most of the imageset of the original theme, not in use anywhere), unused plugins I really don't want to delete in case they've emebedded themselves into the DB and three different jQuery sliders.....

The 3.5.2 media uploader takes me to a new page.
I'll take a dig into the code on a backup of the site when I've got the time...

-Leezer-
 
Based on the info you've provided I'd agree with gord's diagnosis and suggest something was interfering with the button. Not sure why are this is presumably using the browser's own file picker functionality.

See if there are any errors in the JS console in the browser to see if that gives a clue.

Comment out all the JS files that come from the themes folder and see if that solves it, then work back to see if you exclude the one causing the issue.
 
Never get locked into a situation where you are not able to upgrade WordPress by more than one whole version number, eg 4.7 is out now, but 4.6 is patched when necessary.

It wouldn't cost much to get your existing site replicated on a decent theme framework. As has been suggested, you could pick up a flexible theme for £30 or depending on the size of site you could probably get a company to copy your bespoke design for about £400.
 
Back
Top Bottom