Skip Navigation

[Resolved] Image upload works only when user is logged in

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#683875
error.JPG

I am trying to: Use a post-create form and upload an image to this new post.

Link to a page where the issue can be seen: hidden link

I expected to be able to upload an image when I am not logged in.

Instead, I get an alert box saying "There was an error uploading your file".
When logged, I can upload the file successfully.
In any case (logged in or logged out) if I dont upload the file the form gets successfully submitted and the post gets created.

Any ideas pls?

#690505

Hello,

The problem you mentioned above is abnormal, in case it is a compatibility problem, please try this:

1) Enable PHP debug mode, copy and paste the debug logs here
PHP Debugging
In case you think that Types or Views are doing something wrong (what we call a bug), you should enable PHP error logging. Again, edit your wp-config.php file and add the following:

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
This will produce a file called ‘error_log.txt’ in your WordPress root directory. Make sure that the web server can create and write this file. If it cannot, use an FTP program to create the file and make it writable to Apache (normally, user www-data).
https://toolset.com/documentation/user-guides/debugging-types-and-views/

2 deactivate other plugins and switch to wordpress default theme, and test again, If the problem is fixed, you can activate other plugin one by one, try to locate the problem plugin/theme

3) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem page URL, I need to test and debug it in my localhost, thanks

The forum ‘Types Community Support’ is closed to new topics and replies.