- 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]
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
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.....
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
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 !
@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.
@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?
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
@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
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
@Wim
The problem with Alberto was with the host not with CRED plugin.
Pleae make sure your host does allow to upload from frontend.
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!