I'm following the instructions here:
https://toolset.com/course-lesson/front-end-forms-for-editing-content/#1-create-the-form-for-editing
And I'm trying to add an "Edit" button to my content template.
+ Fields and Text > Forms button > select Edit Post Link > select the Content Template edit form > Insert shortcode button.
This results in an insertion of the Shortcode:
<p>[toolset-edit-post-link content_template_slug='admin-front-end-edit-canine-listing' target='self']Edit Listing[/toolset-edit-post-link]</p> Which appears to be correct.
However, only a couple of lines show up where I've inserted the shortcode (see attached image) and on the front-end, the "Edit" doesn't appear at all.
The referenced page, form, and content template where are published with an Admin account.
Referenced page:
hidden link
Please see the images below to find where I've attempted to insert the shortcode.
Thank you very much,
Hello,
Thanks for the details, I am checking it in your website, will update here if find anything
I can see the problem in your website, please check these:
1) Check if there is any PHP error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging
2) WordPress Dashboard-> Tools-> Site health-> Info
in section "Server", your webserver is using below setting:
PHP memory limit 128M
It is not enough to run such a WordPress website with 20+ plugins and custom theme
I suggest you try to increase the limitation to 512M or above, and test again.
More help:
https://developer.wordpress.org/apis/wp-config-php/#increasing-memory-allocated-to-php
section "Increasing memory allocated to PHP"
Hi Mr. Yang,
I did increase the memory. However, while things load a bit faster, the symptom is exactly the same. The Fields and Text box is there with the correct shortcode, however, the word "Edit" is unseen on both the back and front end. Please see my initial post to quickly discern where it should be showing and the shortcode as viewed in HTML mode.
Thank you.
Please check these:
Edit the content template "Admin: Front-End | Edit Existing Canine":
hidden link
There is a warning message: Error while retrieving the form preview. The selected form (ID: "6944") was not found.
You can remove that block manually.
It seems that you have changed the editing post form. I have added another Toolset form block, and display the post form "Canine Listing - EDIT LISTING (ID: 8184)"
Test it in frontend:
hidden link
It works fine, please test again, check if it is fixed, thanks
Thank you, Mr. Yang. It works very well. You are correct that I had replaced the template. Just so I am clear, the problem was that the content template was calling two forms, but the first form threw an error as it had been deleted and this error caused a problem with the display of the shortcode. Is this correct? I'm clarifying because I don't wish to repeat the error. Thank you.
The problem is you are using wrong form block(first one with warning message), as I mentioned above you can remove it manually
My issue is resolved now. Thank you!