Skip Navigation

[Resolved] Edit post link not appearing in table

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 6 replies, has 2 voices.

Last updated by Nigel 4 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1446049
Snip20200107_11.png
Snip20200107_12.png

I am trying to: Add an edit post link to a table. Does it work on your end?

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

I expected to see: I expect to see the text "Edit Community" with a link to the page. It does work if I put the link underneath the table. The delete post link does work in the table so why does the edit link not work? I wanted to put them next to each other "Edit | Delete"

Instead, I got: short does does not render inside the table cell. Cell is empty.

#1446387

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Let me test this locally to see if I can reproduce it.

I'll get back to you soon.

#1446431

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I created a View with table output where this worked correctly, but looking again at your screenshots I'm not sure what you've done.

You've added a standard Table block inside a Toolset conditional block?

The table block doesn't allow adding blocks to the table cells, only text.

Meaning that you copied and pasted in shortcodes into the table cells? And it is in that scenario that the shortcode to link to an edit form doesn't work?

#1447181

Nigel - "You've added a standard Table block inside a Toolset conditional block?"

Keith- Yes, the conditional block checks to see if the user is the community admin role.
If the user is a community admin then they can see the information related to that community in the table.

Nigel - "Meaning that you copied and pasted in shortcodes into the table cells? And it is in that scenario that the shortcode to link to an edit form doesn't work?"

Keith- Yes, that is the scenario.

Nigel - "I created a View with table output where this worked correctly"

Keith- So what is the proper way to add an edit post link to a table cell that will redirect the user to the edit form? Can you share with me the proper procedure or a screenshot of the code?

#1448285

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Try as hard as I can, I can't get this to *not* work.

Looking closer at your screenshots its seems like you also have Layouts in the mix.

So you created an edit form and inserted the form into an unassigned Layout, then made a Content Template for single communities that you designed with Blocks, before following the steps we described in the previous messages?

I've done something similar to that and it still works.

In my screenshot you can see two tables in the template, the first I created just using content templates (no Layouts), the second I tried again, this time with the edit form hosted in a Layout, and both times it works correctly on the front end.

I think I should take a look at your site to see if I can spot what I'm missing, if that's okay?

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

I think I'll also need a community admin user to be able to check the results on the front end.

#1472685

I can get the edit post form to display in the view- so that is working correctly.

I created a view in Layouts and inserted the edit form in the view but when I saved the page my wordpress site went down.
Not sure if that is a bug or not I figured I'd delete the page and instead of placing a view on the Layout I would just put the edit form on it.

Do edit post links only work on content templates? That is the only thing I have yet to try because the page I want to the edit post link on is the manage community page so I figure it must be possible with toolset blocks.

Well I am really excited for your next reply.

#1472821

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Keith

We've had some similar reports since you first posted and have identified a problem with edit forms when using Blocks and Layouts together: https://toolset.com/errata/toolset-edit-forms-loaded-in-a-layout-will-not-display-if-the-post-has-a-content-template-assigned/

There is something of a legacy issue here predating Blocks, inasmuch as the presumption was that if you had Layouts active on your site you would use Layouts to create all templates. So with Layouts active you were obliged to put the edit form inside a blank Layout (instead of inside a Content Template), and the expectation was that you would also create templates for single posts using Layouts.

You could use Content Templates for single posts, but just by having Layouts active you were obliged to use a Layout for the edit form, and this worked.

Because of changes that were introduced with Blocks, this stopped working, because it wasn't envisaged that you would make single post templates using Content Templates rather than with Layouts.

We'll try to fix that.

My advise would be, if you are not too far down the road on this project already, to not use Layouts at all, and you can then use the Block editor for all of your templates, and you shouldn't have this problem. (If you have used the classic Views editor before and like it or want to take advantage of some of the features not yet implemented in the block editor for Views you can update the settings at Toolset > Settings to have both the new and classic UIs available.)

If you are knee-deep in Layouts and want to continue using it, then I'd recommend you use it for everything. Switch to using Views instead of Blocks and make all your templates with Layouts.