Skip Navigation

[Resolved] Repeatable field groups: Is there currently an issue with diplaying them?

This support ticket is created 4 years 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 12 replies, has 2 voices.

Last updated by oliverK 4 years ago.

Assisted by: Jamal.

Author
Posts
#2143551
Screenshot 2021-08-16 at 08.52.39.png

Tell us what you are trying to do?
I am trying to display a repeatable Field Group (not to be confused with a Repeatable Field) using a View block in a Content Template which will display a custom post type.

I have tried creating the RFG within the main field group dedicated to that CPT (which has many many custom fields).
I have also attempted to create the RPG on a new Field group of its own. Neither of those effort gave me the option that appears in Toolset instructions and that you can see circled in the image that i have attached below.

Is there any documentation that you are following?
https://toolset.com/course-lesson/creating-and-displaying-repeatable-field-groups/

Is using creating a view the only way to display a RFG. What is the difference between Toolset Views and Toolset Blocks? I dont see ant dashboard item for Toolset views.

Also, just so you know. the RFG that i am hoping to display consists of a select custom field, a number Custom Field, and a WISYWIG Custom Field.

I hope you can help me

Thank you in advance.

Regards

Oliver

#2143679

Hello Oliver and thank you for contacting Toolset support.

Let me first answer your last questions, then I'll get back to the issue with the RFG and the view. I'll put each of your questions before my answer:
Is using creating a view the only way to display a RFG.
Yes. Unless you are comfortable with programming, and you want to do it with PHP code.

What is the difference between Toolset Views and Toolset Blocks?
Basically no differences at all, except the default value of one configuration/setting. Toolset Views and Toolset Blocks share the same code. They are virtually the same plugin, released with two names. The only difference is that each of them sets a default value for the "Editing experience" setting in Toolset->Settings->General(tab)->Editing experience.
With any of them, you can activate both, the blocks editor and the legacy editor for Toolset elements(views, content templates, archive templates).

I dont see ant dashboard item for Toolset views.
It does not appear in the menu if the legacy editor is not enabled. Enable the legacy editor or both editors in the settings and the menu entry will appear back.

Now, let me try to answer the first question. Why is the RFG hidden from the view selection? I think that happens because the content template is not assigned to the custom post. Make sure that the content template is assigned to the custom post, then reload the editor, and create a new view. I am sure at that point, you will see the RFG in the content selection options of the view. If that does not happen, please allow me temporary access to your website to check this closely. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2143981

A view is a Toolset element that is meant to query the database for posts following a logic, and display them following a design. And I can see the issue on your website, the Credits RFG or the Programme facutly RFG do not appear on the view's selection.

A view can go inside a container element. And a container element can go inside a view too. Basically, the container element is a div that has additional features(can be a link from a dynamic source, etc.)

To better debug this issue, I'll need to test in a minimal setup(default theme+only Toolset plugins). I might also need to test on a different server to exclude any possible hosting issues. Please let me know if I can take a copy of your website for my debugging.

#2144021

Yes Jamal, if you need to you may take a copy of my site for debugging.

#2144659

Thank you. I built a Duplicator package and worked on it locally. The issue persists even with a default theme and only Toolset plugins.

I tried to reproduce the issue on a clean install, and it worked as expected. So, that's an exception that appears only on your website.

I have also activated the legacy editor on my local copy and I was able to create a view for RFGs in the legacy editor. I understand that you don't want to use the legacy features, but that remains a workaround if we are unable to fix the issue quickly.

At the moment, I escalated the copy of your website to our 2nd Tier for further analysis. And I'll get back to you as soon as we have something to share.

#2144677

Thank you Jamal.

Yes, i see the duplicator package. I am glad to see that the duplicator plugin has a setting to delete everything when uninstalled.

Ill be looking forward to hearing from you as i am under some pressure to get the website up and running.

Thanks again

Oliver

#2145163

Thank you Jamal.

Yes, I see the duplicator package. I am glad to see that the duplicator plugin has a setting to delete everything when uninstalled.

Ill be looking forward to hearing from you as I am under some pressure to get the website up and running.

Some additional info:
There is a known wordpress issue recently with some blocks showing “block cannot be rendered inside itself”. This is also showing on my site. I wonder if the issue is related.

Thanks again

Oliver

#2148733

Hello Oliver! Our 2nd Tier has the chance to analyze this issue and he finds out that the current view is corrupt. In fact, if you create another content template for the same custom post type and you add a new view into it, you can choose the "Credits" RFG in the content selection of the view. Check this screenshot hidden link

To correct the current view, we'll need to remove an entry from the postmeta table. The entry is with the key 'usage' for post_id=3312. If you are unsure, how to do it, let me know and I'll install a plugin to browse the database(phpMyAdmin) and I'll delete it for you. Or if you have access, to the database, in the hosting provider dashboard(Kinsta) we can work on it without needing to install any additional plugins.

#2150451
Screenshot 2021-08-24 at 11.12.21.png

Hello Jamal

Thank you for you reply.

Can I first ask you, when you say "the current view is corrupt" do you mean that the "Content Template" is corrupt?

Can you explain to me what is happening when a toolset user puts a RFG into a "content Template that they are building. Are they "putting" a sub Content Template into a parent Content template?

Now, about the Database. I have access. and i have found the entry with the key 'usage' for post_id=3312. see screenshot attached. Do i just hit Delete?

If this fixes the problem will i still have the option of using Toolset Blocks or Toolset Views?

#2150657

Before answering your questions, let me describe some WordPress and Toolset concepts that are important for understanding and fixing this issue.
- WordPress: Posts are the basic data model in WordPress. And they can be from different types. Pages, posts, attachements, views, content templates, archive templates, RFGs are all posts from different custom post types. They are stored in the wp_posts table, and their custom fields(or metadata) are stored in the wp_postmeta table.
- Toolset: An RFG is a hidden custom post, with a one-to-many relationship to its parent post type.
- Toolset: A content template is meant to display only ONE post, whereas a view is meant to display a list of posts.
- Toolset: We can use views inside a content template, and we can use content templates inside views. We can use views(or content templates) inside other views (or content templates).

This being said, I'll try to answer each of the questions below:
when you say "the current view is corrupt" do you mean that the "Content Template" is corrupt?
I meant the view inside the content template. The view that will query the posts of the RFG that are linked/related to the parent post. Check this screenshot hidden link
Because RFGs are a custom post type, we must use a view to display them, instead of a shortcode or a regular block(single field block). For that reason, we create a new view or we reused an existing view with a View block, to display the values of the RFG.

what is happening when a toolset user puts an RFG into a "content Template that they are building. Are they "putting" a sub Content Template into a parent Content template?
The only way to display RFG inside a content template is using a view. We need a view inside the content template. Inside the view's loop, we can insert a content template(meant to display each post from the RFG)

Now, about the Database. I have access. and i have found the entry with the key 'usage' for post_id=3312. see screenshot attached. Do i just hit Delete?
Yes, you can delete it. Or change the meta_key "usage" to something else like "__usage". It is equivalent to deleting it from the view's perspective.

If this fixes the problem will I still have the option of using Toolset Blocks or Toolset Views?
Toolset Blocks and Toolset Views are basically the same. They are two editing experiences, and you can use either of them or both. Currently, the legacy editing experience(Toolset Views) has more features than the new editing experience(Gutenberg and Toolset Blocks). For example, Toolset Blocks do not support user views and taxonomy views yet.

I hope this answers your questions and gives more insights about Toolset. Let me know if you have any questions.

#2150765

Thank you Jamal.

Thank you for your patience and detailed response. You are fantastic.

Deleting the item from the database has fixed the issue. I can now add RFGs to my view block in my Content template.

I will take the time, using your explanation, to become more familiar with using views and RFG's.

On a related but slightly separate issue. Is it ok to or is it not recommended to use the same custom field in more than one Post Field Group (using ADD NEW FIELD >> 'Choose from previously created fields" option) ? For example i have a custom post type for "academic courses" and one for 'CME Courses". Some of the custom fields I created for Academic courses are suitable for use on CME courses. Can I use them for CME Courses? or will that cause issues?

Also,
As this is my first time using Toolset and custom post types it has been a learning Curve for me. Over the last few weeks I created many Custom fields, deleted many, edited many and edited many Slugs. Is there a fear that my database is full of junk? and if so how do i clean it out safely?

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/reuse-custom-fields-in-multiple-group-fields/

#2150803

Awesome, I am glad we could help. However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have created another ticket to answer your last questions. I'll be posting my reply there.

If you don't need any further assistance with the original issue on this ticket, please mark it as resolved.

#2150811

My issue is resolved now. Thank you!