Skip Navigation

[Resolved] CRED Form wont publish when I try to upload image

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 11 years, 6 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.

Tagged: 

This topic contains 13 replies, has 3 voices.

Last updated by alberto 11 years, 5 months ago.

Assisted by: Nikos.

Author
Posts
#22265

- I made a type with a group and added an image field
- then I made a wiew and added Title with link and Types - Image
- then a CRED Form to create content for this view, (below is the Scaffold)
I made a page and inserted the Cred shortcode
when I publish text in the form, it will work fine , but when I add the image it won`t publish anything,
In my localhost works well, I get to publish the image, but not on my server online

Scaffold

[credform class="cred-form"]
[cred-field field="form_messages" value=""]
<div class="cred-field cred-field-post_title"><div class="cred-label">Post Title</div>
[cred-field field="post_title" post="seguridad-todo" value=""]
</div>
<div class="cred-field cred-field-post_content"><div class="cred-label">Post Content</div>
[cred-field field="post_content" post="seguridad-todo" value=""]
</div>
<div class="cred-group cred-group-Productos-grupo">
<div><h2>Productos grupo</h2></div>
<div class="cred-field cred-field-imagen"><div class="cred-label">Imagen</div>
[cred-field field="imagen" post="seguridad-todo" value=""]
</div>
<div class="cred-field cred-field-url"><div class="cred-label">Url</div>
[cred-field field="url" post="seguridad-todo" value=""]
</div>
</div>
<div class="cred-group cred-group-taxonomies">
<div><h2>Taxonomies</h2></div>
<div class="cred-taxonomy cred-taxonomy-seguridad-tipos">
<div class="cred-label"><h2>Seguridad tipos</h2></div>
[cred-field field="seguridad-tipos" display="checkbox"]
<div class="cred-taxonomy-auxilliary cred-taxonomy-auxilliary-seguridad-tipos_add_new">
[cred-field field="seguridad-tipos_add_new" taxonomy="seguridad-tipos" type="add_new" value="Add New"]
</div>
</div>
</div>
[cred-field field="form_submit" value="Submit"]
[/credform]

#22274

I tried in another server and this other server shows me this error

Warning: trim() expects parameter 1 to be string, array given in /home/myserver/public_html/wp-includes/query.php on line 1451

Warning: strip_tags() expects parameter 1 to be string, array given in /home/myserver/public_html/wp-includes/formatting.php on line 955

#23316

Wim

I also have the same problem.
When i try to upload an image via the cred umage field on the frontend, the site "hangs" and the spinner image remains spinning.
Om localhost it works perfect, so it has to be some server setting, but which.....

#23366

Please make sure you have write access to the uploads folder in your server

if necessary go to Settings > Media and re-assign the uploads folder

#23438

I re-assign to wp-content/uploads in Settings > Media
I try this and also change permissions to the upload folder to 777 , but it wont save the post with the image, but the post without image it will save it
also I upgrade the Cred to 9.4
in my localhost works well !

#23440

@alberto
The post failing to save, means there is an error when uploading.
Since localhost works fine.
This is a issue with server settings.
i suggest you enable WP_DEBUG and check any errors.
i suppose you can upload with no problem in backend.

@Wim
This is a different issue, as far as i can tell from the description.
i suggest you update CRED if using previous versions.
There is a javascript error happening somewhere
you can enable the JS panel and see what this error is.

#23445

Wim

@alberto, sorry to have interrupted on your post 😉

But @nikosm i do think its the same problem.
Localhost works fine
On webserver the custom field works perfect in backend but in the Credfom on the frontend the post just will not save when trying to upload an image.
Image upload folders is set to 777 (as it is working in the backend).

Wordpress is version 3.4.2 and theme is child of twentytwelve and i have also tested it with the Views Base theme but without any luck. Cred is also latest version

Hope you can give me advise?

#23559

I tried it in another server and this other server shows me this error

Warning: trim() expects parameter 1 to be string, array given in /home/myserver/public_html/wp-includes/query.php on line 1451

Warning: strip_tags() expects parameter 1 to be string, array given in /home/myserver/public_html/wp-includes/formatting.php on line 955

#23561

@alberto

sent you a private email

#23868

@alberto

Hello, this is an issue with your Apache/PHP settings,

obviously your host has activated Mod_Security or similar module

which returns a 403 (Forbidden) when uploading files

This means that some of the rules to deny files matches
when you use a form in front end

You should contact your hosting about this issue

You can close this issue.

It is not CRED issue

#25280

Hello Alberto,

can we close this issue?

#25781

Wim

Hello Nikos,

I am still running into this issue, even after updating to the latest CRED version 1.0.
I do not know where or how to look for a solution for my issue.
I possible i can email a login to you and hopefully you can find the time to look into this?
Or do you want me to open a separate thread for my issues? although it looks quite similiar..

Thanks and best regards,
Wim

#25784

@Wim

The problem with Alberto was with the host not with CRED plugin.

Pleae make sure your host does allow to upload from frontend.

#25845

Yes, it was my host problem , the mod security I think , not the CRED plugin.

make sure your host does allow to upload from frontend., thanks Nikos!

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

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