Skip Navigation

[Resolved] Suddenly I can't update a post. I have set up a check box for the location and

This support ticket is created 6 years, 1 month 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 9 replies, has 2 voices.

Last updated by Nigel 6 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1150862

I am trying to: update a post by ticking the location and service type

When I go to the post and tick the boxes, the ticks disappear on save
This has previously worked until now.

I haven't updated the plugins because I'm worried about losing my post type relationships. I did them with the old Toolset and when I update on a test version of my site, it breaks.

#1151156

Nigel
Supporter

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

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

Hi Jane

I guess something must have changed—an update to another plugin if you didn't update Toolset plugins, for example—for saving a post to break.

We should really try to get you in a position where you have up-to-date plugins installed, because we can't provide fixes for older plugin versions (releasing a fix would necessarily bring you up to the latest version, and the plugins need to be kept in sync, so you would need to update them all).

So let's get back to trying to get your existing site working with the current versions.

I have access to your site so I can take a copy and update our plugins on it and see what happens.

But what should I be looking out for?

Can you give me steps for some actions to take which you suspect might be problematic?

#1151162
#1151268

Nigel
Supporter

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

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

Hi Jane

I installed the copy of your site, updated the Toolset plugins to the current versions, then ran the migration wizard.

That seems to have worked correctly. Re-reading your earlier tickets I see we were waiting on the functionality to merge the simulated-m2m relationships into actual m2m relationships, due in Types 3.1, but it's not clear to me how you do that (I haven't had such a question until now).

I'm checking on that and will update you.

#1151275

Nigel
Supporter

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

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

Screenshot 2018-11-22 at 12.52.41.png
Screenshot 2018-11-22 at 12.54.04.png

OK, it was easy enough, albeit not-so-easy to find.

Having migrated the relationships, to merge the qanda_related-service one-to-many relationship with the service-provider_related-service one-to-many relationship I needed to go to Toolset > Relationships and the check each of those relationships, then use the bulk actions dropdown to merge.

I got the warning dialog shown in the screenshot, and continued.

After the merge was completed I went to edit a Service Provider post, and—as you can see in the second screenshot—the existing Q&A posts were connected and I tested being able to add new or connect existing posts.

So, test for yourself on a staging site that the above works.

- update your plugins (you may find you have to manually update Types because there was a problem with the installer in your existing Types 3.0)
- run the migration wizard at Toolset > Relationships
- merge the relevant one-to-many relationships to create actual m2m relationships, as I just described
- test

Let me know how you get on.

#1151803

Hi,
I followed your instructions but the relationships aren't working correctly.

Example: go to QAs and select a post.
Scroll to bottom
I should be able to add an existing glossary term, Resource and Service provider
If I go to Add existing glossary term and type in 'accident' it says 'no results found'

I have set up a demo site hidden link and can send login if you want

#1151847

Nigel
Supporter

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

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

Screenshot 2018-11-23 at 10.22.19.png

Hi Jane

I just tried on my copy of your site (see screenshot), but only after also merging the QA and Glossary one-to-many relationships the same as I did for the QA and Service Provider relationships.

Note that this still leaves the QA and Resources relationships to be merged, which I guess you will want to, too.

When you have, confirm that they both work.

The intermediary post types such as "Related Service Providers" still appear in the menu, but probably don't need to.

You can go to Toolset > Post Types and edit these intermediary post types and in the options section uncheck the show_in_menu option.

#1154974

That works in the back end now. The drop down list works.

New problem.
The related info is not showing up on the post.
eg:
demo site: hidden link

What it should look like: hidden link

Glossary lists the title - eg related-term 2365

Service Providers just lists the links eg 'related-service 4114

Resources (Read, Watch, Listen, Look) do not show up the content at all..

#1155326

Nigel
Supporter

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

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

Hi Jane

I see the same on my local copy of your site. I'm looking into it now.

#1155362

Nigel
Supporter

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

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

Screenshot 2018-11-29 at 10.24.37.png

Looking at the first example of a problem, the "Who Can Help? (Service Providers)" section, you have a View "View QA Who Can Help" which queries the intermediate post type Related Service Providers but outputs fields from the parent Service Provider by adding the attribute id="$service-provider" to the shortcodes.

This isn't working any more. It was supposed to continue working, as part of the migration/backwards-compatibility layer. I suspect that it stopped working because we merged the faux-m2m relationships into real m2m relationships, but I can't say for sure.

There are two ways to fix this.

The first is to update the format used to refer the shortcode to the parent service-provider post. Instead of an id attribute we need an item attribute. If you use the Fields and Views button to insert a field and use the Post Selection tab you can specify which related post should be the source for the field (see my screenshot).

That updates the shortcode with the new format, like so:

[wpv-post-link item="@qanda-service-provider.child"]

I tested it and it works.

An alternative that is available because we are now using real M2M relationships is to change the Content Selection for the View and specify not the intermediate post type currently chosen (which is essentially redundant), but the required Service Provider post type directly.

So looking at that same View
- change content selection to Service Providers
- remove the attributes to specify a parent as the post source (the id attributes), because the View will be iterating over the Service Provider posts directly, and no longer the intermediate posts

I also tested this and confirm it works.

It isn't a lot of work, but it is work, and I'm sorry the migration hasn't been effortless.

There is a 3rd option, whereby I pass this to the developers for them to review the migration process—and, specifically, what happens after merging relationships—but it could be some time before you get an update.

Let me know what you want to do.