Home › Toolset Professional Support › [Resolved] Filtering Archive and Pagination issue
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 |
---|---|---|---|---|---|---|
- | - | 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: Views plugin, WordPress Archives
Related documentation:
This topic contains 60 replies, has 5 voices.
Last updated by Beda 5 years, 10 months ago.
Assisted by: Beda.
Hello Beda and thank you again.
I'll update you at a latter stage about "issue 1".
For the time being, we proceeded with "step 2" (adding the missing column). Of course it's good to have the DB structure as it should always have been, to prevent future issues. Anyway, the error you're talking about only appeared (at some time... I'm not sure when) in the "test" website, not in the production one. There, the relationships we saw before this operation are exactly those we see now. That is:
Autori [*] << Autori Pubblicazioni >> Pubblicazioni [*]
Editori [0 .. 1] << Edizioni [*]
Pubblicazioni [0 .. 1] << Edizioni [*]
(So they are all relationships between custom post types; not between regular WP posts and custom post types... which we gathered you somehow found in the database? Maybe we just didn't understand each other on this point! But it's all good... Later on issue 1)
Hello again!
We too had a little stop for the festivities.
To sum it up, we followed your steps:
"
- I updated WPML and removed icl_sitepress_settings (renamed)
- I visited WPML > Languages and setup Italian <> English with your trick (to navigate back and then forward again)
- At this point, no complaints were made by the plugin and I finalized the wizard
"
But...
"- I was asked to update the database (button to click, from WPML)"
WPML doesn't ask anything and we end up having "duplicated" content (that is, all the content are marked as "Italian" language).
BTW, you say " had to reset the Language in Folders"
Folders? Where is that?
Thank you
We don't know if it's relevant or not, but just to let you know...
As we verified by doing some translation work, the "Search" button of the filters in the archive "Pubblicazioni" is NOT the "Search" string in the domain "View pubblicazioni-archivio", but that of the domain "View sort-view-by-intermediary-post-type". The fact is that this latter view doesn't even have a search button and has nothing to do with that archive, which is not using it.
The same happens with the text of all the other filters! We have to edit from "View sort-view-by-intermediary-post-type" and not from "View pubblicazioni-archivio".
We also found this mysql error in our log:
(it seems that the main table name is wrong, missing prefix)
[02-Jan-2019 11:54:38 UTC] WordPress errore sul database Unknown column 'relationships.autodelete_intermediary' in 'field list' per la query SELECT relationships.id AS id, relationships.slug AS slug, relationships.display_name_plural AS display_name_plural, relationships.display_name_singular AS display_name_singular, relationships.driver AS driver, relationships.parent_domain AS parent_domain, relationships.child_domain AS child_domain, relationships.intermediary_type AS intermediary_type, relationships.ownership AS ownership, relationships.cardinality_parent_max AS cardinality_parent_max, relationships.cardinality_parent_min AS cardinality_parent_min, relationships.cardinality_child_max AS cardinality_child_max, relationships.cardinality_child_min AS cardinality_child_min, relationships.is_distinct AS is_distinct, relationships.scope AS scope, relationships.origin AS origin, relationships.role_name_parent AS role_name_parent, relationships.role_name_child AS role_name_child, relationships.role_name_intermediary AS role_name_intermediary, relationships.role_label_parent_singular AS role_label_parent_singular, relationships.role_label_child_singular AS role_label_child_singular, relationships.role_label_parent_plural AS role_label_parent_plural, relationships.role_label_child_plural AS role_label_child_plural, relationships.needs_legacy_support AS needs_legacy_support, relationships.is_active AS is_active, relationships.autodelete_intermediary AS autodelete_intermediary, relationships.parent_types AS parent_types_set_id, relationships.child_types AS child_types_set_id, GROUP_CONCAT(DISTINCT parent_types_table.type) AS parent_types, GROUP_CONCAT(DISTINCT child_types_table.type) AS child_types FROM wp_toolset_relationships AS relationships JOIN wp_toolset_type_sets AS parent_types_table ON (relationships.parent_types = parent_types_table.set_id ) JOIN wp_toolset_type_sets AS child_types_table ON (relationships.child_types = child_types_table.set_id ) WHERE ( ( relationships.child_domain = 'posts' ) AND ( child_types_table.type = 'pubblicazioni' ) ) AND ( relationships.is_active = 1 ) AND ( ( ( relationships.parent_domain != 'posts' OR parent_types_table.type IN ( 'post', 'page', 'attachment', 'oembed_cache', 'user_request', 'wp_block', 'tm_report', 'autore', 'editore', 'pubblicazioni', 'edizione', 'autorepubblicazioni', 'le-nostre-pagine' ) ) ) AND ( ( relationships.child_domain != 'posts' OR child_types_table.type IN ( 'post', 'page', 'attachment', 'oembed_cache', 'user_request', 'wp_block', 'tm_report', 'autore', 'editore', 'pubblicazioni', 'edizione', 'autorepubblicazioni', 'le-nostre-pagine' ) ) ) ) AND ( relationships.origin = 'wizard' ) GROUP BY relationships.id fatta da require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/THEMENAME/single.php'), get_template_part, locate_template, load_template, require('/themes/newstube/html/single/content.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, Toolset_Object_Relationship->record_post_relationship_belongs, Toolset_Object_Relationship->force_record_post_relationship_belongs, wpcf_pr_get_belongs, wpcf_pr_admin_get_belongs, toolset_get_related_post_types, Toolset_Relationship_Query_V2->get_results [02-Jan-2019 11:54:39 UTC] WordPress errore sul database Unknown column 'relationships.autodelete_intermediary' in 'field list' per la query SELECT relationships.id AS id, relationships.slug AS slug, relationships.display_name_plural AS display_name_plural, relationships.display_name_singular AS display_name_singular, relationships.driver AS driver, relationships.parent_domain AS parent_domain, relationships.child_domain AS child_domain, relationships.intermediary_type AS intermediary_type, relationships.ownership AS ownership, relationships.cardinality_parent_max AS cardinality_parent_max, relationships.cardinality_parent_min AS cardinality_parent_min, relationships.cardinality_child_max AS cardinality_child_max, relationships.cardinality_child_min AS cardinality_child_min, relationships.is_distinct AS is_distinct, relationships.scope AS scope, relationships.origin AS origin, relationships.role_name_parent AS role_name_parent, relationships.role_name_child AS role_name_child, relationships.role_name_intermediary AS role_name_intermediary, relationships.role_label_parent_singular AS role_label_parent_singular, relationships.role_label_child_singular AS role_label_child_singular, relationships.role_label_parent_plural AS role_label_parent_plural, relationships.role_label_child_plural AS role_label_child_plural, relationships.needs_legacy_support AS needs_legacy_support, relationships.is_active AS is_active, relationships.autodelete_intermediary AS autodelete_intermediary, relationships.parent_types AS parent_types_set_id, relationships.child_types AS child_types_set_id, GROUP_CONCAT(DISTINCT parent_types_table.type) AS parent_types, GROUP_CONCAT(DISTINCT child_types_table.type) AS child_types FROM wp_toolset_relationships AS relationships JOIN wp_toolset_type_sets AS parent_types_table ON (relationships.parent_types = parent_types_table.set_id ) JOIN wp_toolset_type_sets AS child_types_table ON (relationships.child_types = child_types_table.set_id ) GROUP BY relationships.id fatta da require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/THEMENAME/single.php'), get_template_part, locate_template, load_template, require('/themes/newstube/html/single/content.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WP_Views->short_tag_wpv_view, WP_Views->render_view_ex, WP_Views->render_view, wpv_filter_get_posts, apply_filters('wpv_filter_query'), WP_Hook->apply_filters, WPV_Filter_Post_Relationship_Query->filter_query, WPV_Filter_Post_Relationship_Query->get_settings, WPV_Filter_Post_Relationship_Query->get_settings_post_in_with_m2m, Toolset_Association_Query_V2->relationship_slug, Toolset_Association_Query_V2->get_definition_repository, Toolset_Relationship_Definition_Repository::get_instance, Toolset_Relationship_Definition_Repository->load_definitions, Toolset_Relationship_Database_Operations->load_all_relationships
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi there
This thread was marked as resolved, but I see that you are still posting updates, so I have re-opened it.
However, I see this is a very long thread that Beda took over from Christian. I think Beda is the best placed to continue helping you with this, but he is still off for the rest of this week.
If you need urgent help, let me know.
Thank you for reopening the thread.
The issue is not yet solved on our side, so we will wait for Beda!
Hello, I am back, let me answer the questions
1. Anyway, the error you're talking about only appeared (at some time... I'm not sure when) in the "test" website, not in the production one.
Then this means, the test site is corrupt due to the migration and should not be used for testing.
You can easily check on the live site if the database table is there and if so, then the entire issue is due to the migration that is somehow broken (might be due to the customized database)
It's however not crucial as if the error is not happening on live site and the table is there, with all it's columns, then all is fine (also, you can check if you see the mentioned relationships in the Toolset > Relationships page)
2. So they are all relationships between custom post types; not between regular WP posts and custom post types... which we gathered you somehow found in the database?
Correct, we must have misunderstood us, as I mentioned relationships between posts as in "post types", but was in the understanding later you have no relationships at all on this site. This seems sorted
3. WPML doesn't ask anything and we end up having "duplicated" content (that is, all the content are marked as "Italian" language)
That is strange, but here I have to rely on WPML Support myself. Having mixed languages is not expected and not what I get locally, debugging this should be done by a WPML Support Expert, but for that, you would have to open a ticket there, because it requires an expert WPML Support to spot why we get different results (and how to avoid them on your live site).
I suspect, there are more issues we did not yet discover eventually due to the nature of your server or other software I have had removed locally. WordPress Database Update however when done by WPML Should be assisted by its support.
Having mixed languages after the process I outlined is not expected and not happening locally. WPML Support might be able to find out why this happens (I assume it would also happen without Toolset if you manually re-register the types on your live or staging sites, contrary to when I test this locally, where it works fine even with Toolset)
4. BTW, you say " had to reset the Language in Folders"
Folders? Where is that?
WPML > Languages > the First section, there you can choose languages in folders, or url params.
Now, related to the actual issue of the missing options in the select of the view, after I completed the steps that issue was gone, however, I see you cannot follow the steps due to other issues (Mixing languages).
This needs to be addressed by WPML Support, I fear that I am not qualified enough to assist this purely WPML related issue.
After the mixed languages issues is resolved, the issue with Views also should be resolved as by then you will be at the same stage of things like me after my repeated tests.
I, unfortunately, have to ask opening a WPML ticket for the issue where the languages are mixed, and no database upgrade is asked after you perform the steps I suggested, which are entirely related to WPML (as it organizes the languages of the content, a part that Toolset "control" touch as such)
Note also that our developer kept the ticket open where I reported the missing database table column, as an issue in the upgrade mechanism (this column was introduced just a short time ago) is suspected (leads to missing column)
This will be investigated so it cannot happen anymore.
Please let me know if after resetting WPML (with eventual help from the related Support) the Toolset issue persists, which it should not, we could then retake this from there - however as per local tests made several times meanwhile, this should solve the issues.
When you open the WPML Support ticket, here is a draft so you have it easier to explain the issue to my colleagues
1. Due to some issues with an AJAXified Archive built with Toolset Views, we had to follow some specific instructions given by Toolset Support:
https://toolset.com/forums/topic/filtering-archive-and-pagination-issue/page/4/#post-11712132. At step 2.5 of https://toolset.com/forums/topic/filtering-archive-and-pagination-issue/page/4/#post-1171213, no database update is required, and completing the steps leads to all languages being mixed up (please elaborate to the WPML Support how exactly mixed up these languages are
The Support there will suggest probably to go thru the WPML Debug steps in WPML > Support, and/or other things to do.
Thank you.
Hello,
Please keep this thread open while your colleagues from WPML give us assistance. Thank you
Sure.
Could you share here the link to that thread so I can follow it?
I cannot find your profile in WPML Support, and I would like to follow it also so I can prepare myself ahead of time here in case there will be issues left after cleaning the WPML issues.
OK thanks
I see the only that will get solved for now on this side is the problem with duplicated languages after the suggested rehabilitation steps of the database.
It has a remark as featuring 2 possible workarounds:
- Go back and reset Italian as default
- Use browsers tool and remove "disabled=disabled" from the default language checkbox
Do you know how to accomplish this?
You would, with that settings page open, open the Browser console and find the checkbox that you want to edit (you can highlight its label, and then double-click to the editor with "Inspect")
There, remove disabled so to check it and proceed.
According to the current status (and also according to what I had found in past), this will let you proceed.
If you can do so, on the staging site or where you were testing this, and confirm if it lets us proceed so to fix the Toolset Problems (which it did for me)?
Yes, we did that, but there's still some duplication error... Anyway, the WPML thread has been updated and we're waiting for their second-layer support to step in.
OK; I see you refer to this:
https://wpml.org/forums/topic/wpml-reset-remove-icl_sitepress_settings-but-no-db-update/#post-3121104
Please let me know here anytime we are ready to proceed.
I am not sure the issue that remains there is related to the same things as will get fixed due to the report of the WPML support.
One issue would be the disconnected posts translations, another would be if that remaining issue only affects the selectors of the search (?).
Please do not hesitate to ask here or update me with Shekar's news (I am also subscribed there however from now on).
I will follow the thread and meanwhile escalated this to developers, so it will not be closed by the bot.
Do I BTW understand it correctly that the affected search filters now almost work properly, but do display duplicate, whereas in the beginning they displayed not enough, options?
"Do I BTW understand it correctly that the affected search filters now almost work properly, but do display duplicate, whereas in the beginning they displayed not enough, options?"
Yes, sorry I didn't tell you in the previous post... This has become so long and complex we almost forget where we started 🙂
We finally - almost - have what we wanted, that is:
- Pagination working
- The search fields show ALL the values for a certain taxonomy (nor just those of the current page)
- Those values are separated: in the Books archive we have authors of Books; in the Games archive we have authors of Games etc
Now, there's that duplication problem to solve (WPML forum) and once that's done I think you could close this ticket.
Truth be told, there's one very last step, that is to make the search AJAX-ified (automatic reload when changing input). We have already verified we have an issue with this, but I would prefer to complete the thead with WPML before and maybe we can just open another ticket about it.