[Resolved] Views RC certain views no return no items

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.

This topic contains 6 replies, has 3 voices.

Last updated by Stephen Vaughan 1 year, 11 months ago.

Assigned support staff: Christian Cox.

Author
Posts
#750220

Hi,

Amir asked us to test the new release candidates and I am glad that I have not applied these to any of my live sites.

I have been testing the release candidate of Views on a localhost copy of my website and I am seeing loads of issues.

Some views are not rendering anymore. All I get is the shortcode rendered in its place. More importantly I am seeing issues with with the Migration for Relationships and the Relationship Wizard.

I see the following warnings on Moving post connections to their new tables (this usually takes a few minutes)

> Post relationships migration started.
> Maintenance mode enabled.
> No tables had to be dropped.
> The toolset_associations table created.
> Relationship definitions migrated.
> Relationship definition "print-year_print" not found.
> Relationship definition "print-year_print" not found.
> Relationship definition "print-year_print" not found.
> Associations processed.
> The migration process is complete.
> Maintenance mode disabled.

I am doing some serious troubleshooting on this and am relying on other backups to restore from when things don't quite go right. I only got the migration mechanism to run once in one of my many attempts. If I try to create the relationship manually the wizard only gets so far and won't move on the the final two tabs in the sequence. I get the following error:

An error when creating a relationship "": No relationship with slug "year-print-year" was found.

So that's put a spanner in the works as I can't even make a relationship.

Moving on to views. Here is what I am supposed to see on a page for a year:

hidden link

and on the pages for the prints themselves, half way down:

hidden link.

I attach a screen shot of the result of installing the release candidates.

Those views are made based on categories. So for each year/s I take a duplicate of a view that shows all prints and filter on the category for the years. I have another custom field in my content template where the shortcode for the year view goes. I know this is an unconventional approach but it works.

As this issue has cropped up I have managed to restore the year buttons view and the views on the year pages by using a different filter. I have tried the recommended Displaying Brother Pages method but i get the no results found message:

https://toolset.com/documentation/user-guides/displaying-brother-pages/

Note I tried that method on a version of the site using the current version of Toolset plugins and I can't get it to return related brother items in the view.

I have spent five hours on this so will wait for advise on the matter. If you want I can make a clone with duplicator and dropbox it to you.

#755782

Ok, I have pretty much sorted this.

The relationship migration was failing due to some issues with the database. I noticed after taking a backup from my main site and deploying it as the local version that some things were missing. The Gravity form that I use wasn't installed and the system status panel in Gravity forms were showing that the appropriate tables where not present. I made a new database in myPHPAdmin and redeployed the tables in the backup to it and all was well; the form was back and the relationship migration succeeded.

On setting up views that would show up prints from the same year group, I tested on another site that has a similar structure to the one I use. It has a very simple taxonomy using only year, whereas mine was more complex, including details of each print, dimensions etc. With the post type just having one category I was able to filter on this for a view for the year grouping so I set up an extra taxonomy on my site for prints for just years, whose sole purpose is to help in filtering one main view for all my work based on years made. I will configure and categorise all the posts on the new site now and create the couple of views I will need for this on the live site now so that everything is ready once the the final version of Views is released. I currently have using a view for every year. This will tidy things up with far less views.

I still want to see if I can get a version of this to work by displaying brother pages so may still need some instructions on that.

#756370

Beda
Supporter

Languages: English (English ) Spanish (EspaƱol ) German (Deutsch )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Thank you for the report.

I see you were able to solve the issues but I want to confirm so to maybe update and inform the developers.

1. Can you submit a copy of the site you started with and ended up having the troubles mentioned?
If so, can you submit me the copy?
https://toolset.com/faq/provide-supporters-copy-site/

2. I understand after the update to RC, you run in 2 issues:
- the migration did not finalize
- the Views previously displaying, now did not even expand the ShortCode (which usually is a sign that the plugin is either not active or the ShortCode does not exist)

Can you confirm that these where the problems and if possible, add a copy of the site, so I can send this to the Developers for an analysis?
Even if you had some database tables created by another plugin and missed that plugin on migration, it should not affect the migration.
And surely, a ShortCode should not be just printed, it has to expand.

I will forward this to the Developers as soon I have the data to provide them.

For further "how to" questions I suggest opening a new ticket.

#761377

Hi,

I forgot to add this, see screenshot. I am not sure why I am seeing this. I don't see anything untoward and it has been there for a while and hasn't caused me any bother. You can investigate with the backup I sent.

#763243

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hello, I'm following up on Beda's response because he is unavailable today. Can you share the Dropbox link with me so I can download the site clone? Private reply fields are enabled here.

#763656

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Okay in my first test, I deactivated all plugins, activated Divi parent theme, deleted Types and Views, and installed the new RC versions of Types and Views. Then I ran the migration process, which was successful and showed no errors. After migration I went to this page:
/print-year/prints-2017-2018/
I could see the shortcodes written out to the page, like you described. However, I was able to fix this issue by updating the Content Template in the Divi Builder. The existing template uses the following code:

{!{types field='year-shortcodes' output='raw'}!}{!{/types}!}

The output='raw' part is what's causing problems here. Remove that and the Views begin to show as expected in my local environment.

Finally I tried to create a new Post Relationship using the Relationship wizard, and I didn't run into any problems there either. So I think something else must be going on in your environment. Can you try the update process like this:
- Deactivate all plugins
- Activate the parent Divi theme
- Delete Types and Views
- Install the latest RC versions from your account downloads area
- Activate Types and Views, then run the migration process
- If the process is successful, edit the Content Template and remove the output='raw' attribute, then retest this page
- If that is successful, try to create a new Post Relationship using the wizard.
- If that is successful, reactivate other plugins and your child theme, then retest post relationship wizard.

Let me know what you find out.

#771151

Hi Christian,

Just got a chance to look over your advise. Firstly, and I not sure if you saw the correspondence to Beda, I already sorted out the relationship migration and getting my views to appear. I reworked how I was getting related work to show on my print posts. This means I now only use one view for all prints, filtered on the year category and, showing work only related to that year. Likewise on the year pages another view but filtered on the year parent and its children. This means I was able to get rid of all the vies I had made for each year.

I also fixed the warning I was getting every time I updated the posts.

Thanks for looking into this for me. I was able to improve my website and clean up some issues that I didn't know were present.