and it actually works, BUT what happens is that it creates a new post instead of updating the existing one. The form is in edit mode (but I am planning to use the same code also in add mode). All fields of the existing user profile are updated correctly by the form if changed, but excerpt that is updated correctly (including age) in a newly created post where all other fields are empty ! in the user interface the existing profile is given as correctly updated but another empty form is added for the new post below the message ! see screenshot.
Why this happens ? how can it be that a form in edit mode creates a new post ?
thanks
Regards
Nicola
Glad to see the code is now working to some extent.
Some debugging is needed here. What I recommend doing now is to remove the code or deactivate it. Test the update form again to see if a new post is created. Then re-add your code line by line of course keeping the parts that will allow it to function in its basic form.
Alternatively can you paste your final code here so that I can see exactly what is being used? I tried looking for the function on your site but wasn't able to find it.
Hi Shane,
I saw your access. You didn't find the code because I am testing it on localhost. Now I have added the code to the online site for you to see it, but it's inactive because I am afraid it could crash the site (I am not a debugging wizard either ...).
I can guarantee that without that code the form works perfectly, no post duplication. In order to test the snippet you need to update the first two fields of the form (type and age) connecting as a non-admin user and check if the Excerpt field is filled.
Thanks
Nicola