Problem: Clicking the “Add Photo” link opens up a New Page
Clicking the “Add Photo” link opens up a New Page, usually a 404 error. What gives?
This symptom can have a couple of different sources.
- Most frequently, this is a template problem. There are two template tags (PHP code that is specific to WordPress and used in Themes to make stuff happen) that should be called in all WordPress Themes…well, at least all the ones that intend to use plugins or do anything cool:
- wp_head() – should be called in the header.php file,
- wp_footer() – should be called in footer.php
Some of the commercial frameworks may have abstracted these calls away into their own hooks. But if you’re using a theme by one of these guys, this is probably not your problem.
- If #1 is not the problem, then there might be a plugin that is causing a problem in either
- The PHP script on the server – you’ll probably see a PHP error somewhere
- The Javascript on the client – if you run FireFox, get FireBug and it can help you spot JavaScript errors
Try deactivating your plugins to see if you can isolate the offending plugin. If there are lots of activated plugins, I usually try deactivating big chunks of them instead of 1-by-1. Figure out which big chunk the problem is in and narrow down from there.
After you find the offending plugin, the fun begins…you can try to fix it yourself, or try to get the plugin developer to fix it for you.
Free tip: If you’re running a bunch of plugins ( 10 or more ), you might want to consider if you really need all of them…maybe not. Plugins usually require extra processing time, so in general, the fewer the faster (notable exceptions exist). All the same, don’t be afraid of using plugins, just be selective. They are the one of the greatest features of WordPress.
- Another problem might be clicking the Add Photo button before the page is completely loaded. The Thickbox initialization occurs late in the page load, so you have to wait for it…I’m going to hide the Add Photo button until it’s ready in a future version of PhotoSmash.
- Another issue on the user’s end might be that their browser might be blocking Javascript (or have it turned off). The upload is AJAX and requires Javascript be on, even if you’re always displaying the upload form (forgoing the Thickbox).
If you come up with some other causes and solutions, please post below and I’ll add to the list!
Filed under: Troubleshooting
















Saturday, 27 February, 2010 at 9:49
Comments closed…please use forums:
http://smashly.net/community/
Saturday, 27 February, 2010 at 5:23
Hi there,
somehow I have a problem, that clicking the add photo button, will give me the add photo screen but with 2x all the inputfields and buttons. If I close the window (with the x instead of by clicking ‘done’) the next time i click add photo, the entire window is empty.
I disabled the wp e-commerce shopping cart plugin and then the add photo box works like normal again. I will post this too with the shopping cart developer (WordPress Shopping Cart by Instinct Entertainment) for support, but thought i might mention it here to see if anything can be done from within photosmash (which totally rocks by the way
).
Saturday, 27 February, 2010 at 9:47
Hi erwin,
Thanks for the compliment!
I can’t imagine what is going on with Shopping Cart. PhotoSmash uses the normal Thickbox function, so I’m thinking they have probably hi-jacked that javascript function and are doing something on the event.
One thing you might try is to turn off the Thickbox and just let the form show up on the page…you can either have it hidden and show it on clicking the Add Photo link or you can have it showing all the time.
Cheers,
Byron
Saturday, 27 February, 2010 at 9:49
Oh…Please use the forums instead of comments…I’m actually trying to shut down comments because I can’t keep track of where all the comments come into otherwise
The forums keep everything in one place, at least.
Cheers,
Byron
Saturday, 5 September, 2009 at 14:19
I keep getting this error when clicking the add photo link using the Google Chrome browser.
The requested URL /TB_inline was not found on this server.
I’m on version 4.01 of photosmash and version 2.7 of wordpress. Add photo is set to allow administrator upload only at the moment.
The link to the page I’m trying to use photosmash on is http://northwesteverett.org/?page_id=1495
Any help would be appreciated.
Saturday, 5 September, 2009 at 14:26
I’m noticing a javascript error with the function bwbpsShowPhotoUpload.
Seems to be looking for the form_pfx but when I’m clicking the link it is not passing in a value which is causing the error.
Novice programmer so again any help appreciated.
Sunday, 6 September, 2009 at 11:16
Russell,
It looks like you’ve got the problem outlined in #1 above.
I think you need to add < ?php wp_footer(); ?> into your footer.php file.
BB
Sunday, 6 September, 2009 at 12:42
Nope. Have that in there. Here is the code from my footer file.
is powered by WordPress | Photo by rexfarucao
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(“%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
try {
var pageTracker = _gat._getTracker(“UA-5650888-3″);
pageTracker._trackPageview();
} catch(err) {}
Any other thoughts?
Sunday, 6 September, 2009 at 12:44
Looks like that post got truncated. Sorry. The line is in there, so I’m still stumped. Thanks for your help.
Sunday, 6 September, 2009 at 15:06
Hi Russell,
Cool…sorry for the rabbit trail. Now I’m thinking it’s missing the
< ?php wp_head(); ?>
From header.php file.
BB
Sunday, 6 September, 2009 at 17:40
That’s it. Does it matter where in the header.php file the line of code is located?
Sunday, 6 September, 2009 at 17:42
Never mind. Figured it out. Thanks for ALL your help. Much appreciated!
Friday, 28 August, 2009 at 3:45
how can I put 300 photos with a single update?
Thank you.
Friday, 28 August, 2009 at 8:40
Sorry, Luupuxall,
It cant’t do mass uploads just yet. This is the 3rd request this week for this, so I will move it up the list.
BB
Friday, 28 August, 2009 at 9:30
tanks you for good work and
excuse my bad English
Monday, 3 August, 2009 at 14:18
Kalil’s Javascript is enabled and she’s running 2.0. Any more suggestions for her?
Monday, 3 August, 2009 at 6:37
Thanks! I just wanted to make sure I was thinking along the correct lines.
Sunday, 2 August, 2009 at 18:29
I’m having some users (http://www.cornsnakemorphgallery.com/forum/?wpforumaction=viewtopic&t=23.00) having problems getting the upload box to work. I’m not sure what it could possibly be other then what I’ve already suggested to them.
Sunday, 2 August, 2009 at 19:58
SKunder,
I checked out the thread. There is something going on with their JavaScript, similar to what is described in this 404 Post. I need to add a couple of the items you mentioned in your forum: 1) wait for the page to completely load before clicking Add Photo; 2) make sure JavaScript is not blocked on the browser.
The fact that the one user was able to do it with Explorer, but not FF makes me think something is awry in the browser settings.
I don’t think it’s a PhotoSmash problem, but I definitely want to squash it if it is.
It does give me the idea to put a message on there that JavaScript must be enabled, and have JS replace it with the Add Photo button when the page is ready for uploading.
That way, the user would be made aware that JS is a problem and they won’t be fooled with the Add Photo button.
I’ll put it on the list.
Please let me know if you find out what the problem is and I’ll document here.
Cheers,
Byron