Skip Navigation

[Resolved] Create page with parent post details followed by table of all child post details

This support ticket is created 3 years, 7 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
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 32 replies, has 2 voices.

Last updated by davidm-13 3 years, 6 months ago.

Assisted by: Jamal.

Author
Posts
#1787727

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello David,

I suggested building the Duplicator copy locally just to confirm that the issue came from the server. Because if it works in my computer and yours and does not work on the server, it will mean that the server has something interfering with Toolset.

The database server can also implement a caching system that could be the cause of this, but I won't think so. I think, that the server(apache or nginx) is having some kind of caching such as Memcached or Varnish. And that still holds some old values.

Regarding your question of uploading the Duplicator copy with cPanel, I would agree, if it is another server. If it is the same, there will be no benefit to that, you will still get the same error.
If you have a different hosting or server, you may try that, but please note, that the Duplicator copy that I have prepared does not have the /uploads/ folder, and excludes images and archive files. You will need to create a different copy that holds the whole website.

#1787993

Hi Jamal,
Not easy getting the hosting provider - Fozzy - to take an interest or any responsibility for my problems.
I passed on your observations from reply #1786317 to them, their last response was:

"We are sorry, but we do not know which cache we are talking about. On the server side the caching of your site data is not enabled. Check if the site side cache is enabled through plugins and modules."

At the moment I'm working on setting up the site on localhost, once I see it's working I guess I'll have to start looking for a new hosting provider - any recommendations?

You've been a great help - if you hadn't checked I'd still be going round in circles with this.
I'll keep you updated.
Thanks

#1788773

Hi Jamal,
I have a field species-id that is common to both Plants and Complaints post types. Can I create a View to select all Complaints for the current Plant (post) by comparing their species-id? Maybe this would work as an alternative to the parent child view that I'm having problems with.
Need some guidance on how to setup this view using shortcodes
Thanks

#1789007

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I am afraid, that the issue, is beyond how the view is configured. So, even if we try with another view, we may hit the same wall again.

I'll still help with any question/issue on the Toolset plugin, that's my job 🙂

To answer your last question, I would say, that you will need to pass the "species-id" as a shortcode argument to the view. Check this article on how to do that https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/

#1789367

Hi Jamal,
I have the loop:

		<wpv-loop>
			<tr>
				[wpv-post-body view_template="loop-item-in-complaints-by-species"]
			</tr>
		</wpv-loop>

where and how do I add the comparison complaints -> species-id equal to the current Plants -> species-id to output all the Complaints for the plant?
Thanks

#1790395

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi David,

I do not think this will resolve the issue. Because this will be also a parent/child view. And because the issue is almost probably from the server setup rather than the views setups.

So, I suggest, that we work on a test site on our platform to answer your questions. For that reason, I have created a new installation, you can log into it with the following URL hidden link

Please create both custom post types(Plants and Complains) and create a couple of test posts and I'll help you get both cases:
- A parent/child view without comparing species-id.
- A child view where we compare species-id.

Does it sound good for you?
Let me know what would you prefer.

#1790653

Hi Jamal,
Really appreciate this opportunity to set this up under your professional guidance. I'll set up the Plant and Complaint posts, create some test posts and let you know when I'm done.
Thanks

#1791125

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Awesome!

I'll set this ticket as waiting for your feedback until you get this ready and we'll continue.

#1791205

Hi Jamal,
I've successfully imported the structures. Having problems importing data - used dashboard > tools > export / import, after exporting all content I have an xml file, the import operation appears to work successfully but after importing there's no data in the posts, taxonomies or associations. Are there limitations with this demo, do I need to create the test data manually or am I doing something wrong?
Thanks

#1791219

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Let's create a sample data manually, just a couple of posts to test. Some posts with similar and different species-id so we can test our views.
I don't see a need to debug why the import/export is not completely working, or to have a huge amount of data and get lost on it.

#1791229

Fair enough, I'll let you know when it's ready

#1791321

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Please check this new installation, I just created to demonstrate how we can build both views:
- View of children Complaints.
- View of children Complaints that have the same Species ID as the parent Plant.

Use this URL to login: hidden link

I created:
- Custom post types: Plants and Complaints.
- Custom field Species ID, assigned to both Plants and Complaints.
- Relationship One-to-Many, Plants to Complaints.
- Created the following posts:
- "Plant 1"(species id: 1), with children: "Complaints A"(species id: 1) and "Complaints B"(species id: 5).
- "Plant 2"(species id: 2), with children: "Complaints C"(species id: 2).

Then I created the views:
- View of children Complaints: Check it here hidden link and check its query filters hidden link
- View of children Complaints that have the same Species ID as the parent Plant: Check it here hidden link and check its query filters hidden link

I, then, created a content template and assigned it to the Plants custom post type. It displays the plant's species id, then the view of all children, then the view of the children with the same species id.
Notice, that the first view was added using a View Block, and the second one using a shortcode.
We need to use the shortcode for the second one, so we can pass the species id of the parent plant in an argument(specie):

[wpv-view name="complaints-linked-to-current-plant-with-the-same-species-id" specie="[types field="species-id"][/types]"]

Check the content template here hidden link

I hope this helps. Let me know if you have any questions.

#1791509

Hi Jamal,
Only just saw your last reply after spending many hours trying unsuccessfully to setup the test cases.
Seems you've done it all for me - much appreciated.
One problem - when I try logging into any of the links I get the white screen with the message:
There has been a critical error on your website.
So I haven't been able to check it out yet.

#1791513

I'm also getting the same message on
hidden link that you set up for me.
Hope it's not something that I'm doing that's causing these problems.

#1794155

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I suppose that the platform was having issues when you were trying.

I just tried the new test site and I was able to login successfully using this URL hidden link

Can you try again?
If you are able to log in, check the views that I referred to in my previous reply https://toolset.com/forums/topic/create-page-with-parent-post-details-followed-by-table-of-all-child-post-details/page/2/#post-1791321

Let me know if you have any questions.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.