Skip Navigation

[Closed] New Update has developed a conflict

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 8 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Beda 8 years, 4 months ago.

Assisted by: Beda.

Author
Posts
#354532

I am trying to: Display custom post types in a sorted table.

I'm not able to be too precise about this, it is more a development issue I guess. I doubt there is going to be a temporary fix you can offer me. Here goes:

I have some fairly complex code written into my site, that is used for sorting and displaying the content of custom post types as a table of data. if you go for example here

hidden link

and navigate to the 'Discography' Tab. The table you see there is populated by a combination of custom posts generated through the Types plugin (dubbed Opera Repertoires and Concert Repertoires) which are all child post-types of the page you are viewing - which is another custom post created through Types, dubbed 'Artist'. However that is only some of the data. It is mixed and sorted with table data from an old archival site for the company, stored in a MySQL database.

It is also driving the larger quantities of data on the previous tab 'Repertoire'

This code took a long time (and quite a bit of money) to develop but it does function beautifully.

Until the latest update of Types that is. (Actually i can't be 100% sure its the latest update - lets say 'a very recent one'

The recent update has a conflict with the code for my sort and display table, rendering them inoperable.

Basically, as you can probably imagine from the repertoire table display, each custom post has four custom fields:
Composer, Work, Record Company and Disc Number.

The new update of Types causes a disruption between the content of the four fields, so that in table display you'll find data lines getting out of sync with each other. In particular the fourth field (CD Number) gets randomly out of sync - at least the visual appearance is that of randomness.

This bug does seem limited to the fourth field. on the previous tab, the sort and display of Opera Repertoire - which contains only three fields was unaffected.

What seems strange about this bug, is that my code IS NOT written to sort individually on the basis of the different fields. It does NOT do a heirarchical sort ie

First sort by Field 1
then by field 2
etc

it ONLY looks at the data in field one COMPOSER to make sort and display decisions. the contents of the remaining fields are then simply placed accordingly.

It seems a shame if the update has rendered Types fundamentally different on this technical level, such that the substantial investment we made less than a year ago in deploying the TYPES plugin, is now redundant. Could this be looked at in the next update?

Unfortunately, if you look at my previous thread, https://toolset.com/forums/topic/error-message-function-preg-replace/ you'll see that I had been holding on to Version 1.7.4 for a long time, because it was the most recent version i had that did not trigger the conflict with the term 'playlist'

As that correspondence indicates that I did update to 1.8.7.1 in October and stayed on that version until last week. I did then update to 1.8.11, in which the problem exists. I can tell you that when I roll-back as far as our backup that incluces 1.8.7.1 - the problem still exists. When i roll-back to version 1.7.4, we're okay.

So at the moment my site is back using version 1.7.4

However as mentioned in the other support thread, even this version does occasionally display the

[function.preg-replace]

error. This is not a critical issue at the moment, as refreshing the affected page seems to correct it and the display comes up. But I really need an update that completely addresses problem one, without causing problem 2. Or perhaps, as Yuri speculated in the previous thread, we could introduce a patch-fix for problem 1, rather than rolling over to an update that causes problem 2.

Thanks!
Chris

#354693

Thank you for contacting us here in the Support Forum. I will try to help you as quick as possible to solve this situation.

I do hope to properly understand the issue.

You display Child Posts of the currently viewed Post in tabs, with custom code.

Usually you can simply use Views for this, by creating Views that are included in a Content template which is applied to your "parent post".

In the View you query Posts that are child of the currently viewed Post.
https://toolset.com/documentation/user-guides/displaying-related-child-posts/
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/

In the Loop you can insert your Tabs (HTML) code and call the proper fields, even in a Sortable Table or grid.

This can be done with the GRID Wizards as example.
https://toolset.com/documentation/user-guides/view-layouts-101/

Do I understand correctly that those tables you have in the Tab where previously sortable and now not anymore?

If I do misunderstand the issue, can you elaborate on what you should see, and what you actually see?

I would also need to know why it is done with Custom Code as this seems to be possible to be done with Views / Toolset default features.

I apologize if I misunderstand the point here.

#354763
Data display incorrect.png

Hi again

As I've attempted to describe above. My site sorts posts created in Types along with OTHER data contained in database tables - imported from an old (non-wordpress) website.

Therefore we had to have custom code written to merge and sort data from the two sources.

Consequently, we do not use Views on the site.

In the attached screenshot, the contents in the last column of the four rows marked is incorrect. The data has been mixed up, and is attributing those 'disc numbers' incorrectly. They belong on other lines

Hope this clarifies

Thanks
Chris

#354903

I unterstand.

In the Column Disencumber (the 4 items you show with the arrow) should be on another Row?

I apologize if I don't know where they should be, as I don't have insight in the setups and what those numbers are meant to describe.

I need to know how you inset that Field's value there, and, since you are sorting by the First Column Value one, how it is related to that (sort by) value.

Of those Values are somehow connected (post title and according post meta as example) there is no reason why this should (on a per row basis) been mixed up.

I need to know more how the issue presents itself and how you achieve the data rendering on a example.

As example, do you have a WP Query that gets the (first Column) value, sorts it by your criteria, and then gets the post meta to that to populate ht rest of your HTML?

The data must connected somehow, and if it is, there is unlikely a reason for it to break, unless there is overlapping info or unclear coding where the connection is not evaluable.

Please could you provide me the additional Infos?

Thank you for your patience.

The topic ‘[Closed] New Update has developed a conflict’ is closed to new replies.