Skip Navigation

[Resolved] File upload, only stores file name, no actual file

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 4 voices.

Last updated by fedeD-3 5 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#803382

Hi i've created a CPT with a CPF for file uploads.

I've created a CRED form (autogenerate) ...

It all seems to be ok when i add a file for uploading and submit the post.

The weird thing is, that when i want to putput the file url, i only get the filename... not the full url. When editing the post from the WP dashboard, also only the filename is stored... not the actual path. The file isn't anywhere... not in the media library... not in the server wp-content/uploads.

When adding the file from the backend, it gets stored in the media library and outputs correctly including the full path.

WordPress is installed in a subfolder on a dev environment. Any idea?

Herre

#804334

Okay the first thing I would do is try to narrow down the source of the problem. Please deactivate all plugins except Types, Views and CRED. Then activate a default theme like Twenty Seventeen, and try again. If the problem is resolved, reactivate your theme and plugins one by one until the problem returns.

If the problem persists after disabling plugins, please turn on server logs in your dev environment and check to see if any server-side errors are generated during the file upload process. If you're not familiar with server logs, I can show you how to activate them. 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');

Try to upload an image with CRED again. If any server-side errors are thrown, an error_log.txt file will be created in your site's root directory. Please send me its contents. Once that is done, you can revert the changes you made to wp-config.php.

If no error log is generated, then activate a child theme and add the following code to functions.php:

add_filter("cred_file_upload_disable_progress_bar", "disable_progress_bar");
function disable_progress_bar($val) {
    return true;
}

This will disable the AJAX uploader and require a full form submission. Please try the CRED form once more and let me know the results.

#886911

Thank you... I was busy on other projects lately... will try your advice to find out what is the reason for not uploading... i'll keep you posted.

#888979

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Christian is on vacation. This is Minesh here and I'll take care of this ticket now. Please check and let us know if you need further assistance.

#1072576

Hi, I have the same problem.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.