Home › Toolset Professional Support › [Resolved] “Upload failed!” message when trying to upload a new CRED post
Problem: When I try to upload a custom field image in my CRED form, I am shown an error "Upload failed!".
Solution: In this case it appears the Sharebear social plugin is causing a conflict. Try a different social sharing plugin for fastest resolution.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
Tagged: Content-submission forms, Toolset Forms
Related documentation:
This topic contains 12 replies, has 2 voices.
Last updated by Charles 7 years, 3 months ago.
Assisted by: Christian Cox.
Support,
I am receiving the following message when I try to upload a new post: "Upload failed!"
Not sure why I am receiving this message. The CRED form was working properly and I haven't made any changes to it.
Thanks,
Chuck
Hi, I'll try to help.
- Is this happening for all image uploads, or only image uploads in a particular custom field, or image uploads when you click "Add Media" in a text editor area?
- Can you enable server logging and retest this? I'd like to see what errors are logged in the server logs. Please open the browser console when uploading and report any errors you find here as well.
If you're not familiar with the server logs, you can see how to enable debug logging here:
https://toolset.com/documentation/user-guides/debugging-toolset/
Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);
Then add these lines, just before it says 'stop editing here':
ini_set('log_errors',TRUE); ini_set('error_reporting', E_ALL); ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
Upload another image with CRED. This will create an error_log.txt file in your site's root directory. Please send me its contents. Once that is done, you can revert the updates you made to wp-config.php.
Did those steps. Error file attached.
I haven't reverted to the original settings. Waiting on your response till I make the changes.
I'm not able to see any attachment or error log file, can you take another look?
Screenshot: hidden link
I don't have an option to upload anything but an image now.
reopening
Okay I can see from this screenshot you've got issues in functions.php that should be resolved. One is a script or style enqueueing problem, and the other appears to be related to the [wpv-post-param var="listing-id"] shortcode being used without the parameter "listing-id" actually present in the URL.
I'm not able to see anything about the CRED form here though. Is this the page you are shown after submitting the form? If so, please try to turn off all error logging in wp-config.php and see if that fixes the main problem with uploads. It could be that logged errors are causing problems with the file upload process.
If that does not resolve the issue, let me know if it's okay for me to test this CRED form on your site, and how to access it. I'll take a closer look.
Feel free to test as I can find the problem. I haven't changed anything that would stop the form from working.
Do you still have the login credentials? From there, you would click the page "post a motorcycle"
Thanks,
Chuck
I just ran a test and checked the error log. There's a fatal error thrown when I submit an image, see at 11:46:14 UTC in the logs:
[09-Aug-2017 11:46:14 UTC] PHP Fatal error: Call to undefined function cmb2_bootstrap() in /home/artillio/public_html/motorfieds.com/wp-content/plugins/sharebear-pro/admin/cmb2/init.php on line 154
I temporarily disabled this plugin and tested again, and my image uploaded successfully. Can you confirm?
Disabling the plugin solved the problem.
Should I find a new sharing plugin, not use a sharing plugin at all or can my current setup be adjusted to work with toolset?
Thanks,
Chuck
I would try a different sharing plugin unless you're really attached to this one for some reason. The reason I say that is that we're not really a good source of information about this plugin or if it's possible to configure in a way that is not conflicting with Toolset. In order to investigate, we may have to work with the other plugin's developers and that always takes a while. You'll probably get faster results by changing out sharing plugins and retesting.
If you're really attached to sharebear, I can ask our developers to take a look, but there's no guarantee it will be resolved.
No worries, I'll find another!
Thanks!