Skip Navigation

[Resolved] Filtering Archive and Pagination issue

This support ticket is created 6 years, 2 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
- - 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)

This topic contains 60 replies, has 5 voices.

Last updated by Beda 6 years ago.

Assisted by: Beda.

Author
Posts
#1168457

Hi

Related to this:
https://toolset.com/forums/topic/filtering-archive-and-pagination-issue/page/3/#post-1167568

I mean the fields. The field where you store the year is marked as not translatable in Toolset > Custom Fields.
But, it seems to be translated for each post nonetheless.

If you want to use the same value (I suppose you do) for the year in the translated posts, you could either "copy them" or if you will have to "translate" them, translate.
This can be done on the Single Field Edit Screen in Toolset > Custom Fields, or, in WPML's translation settings.

Related to this:
https://toolset.com/forums/topic/filtering-archive-and-pagination-issue/page/3/#post-1167743

Absolutely, please go ahead and remove the current test site, so to re-deploy the production site on it.

I have received a (remarkably short, but powerful) instruction from the WPML Support team which I tried last Friday on the testing site but had failed with a fatal PHP error (which I immediately undid again).
The instruction is to remove the WordPress option "icl_sitepress_settings" in the database and recreate it by setting up WPML again.
I will try this again, as now I have as well instructions on how to avoid that Fatal error.

I will try this as soon you have re-deployed the site.

I apologise this takes longer than expected and will do my best to solve this within this days, together with the colleagues.

I re-enabled a private reply, in case you need to submit new login data.

#1168537

Yes, that is one the things we did yesterday: now, most custom fields for most post types are set ad "copy" from the original language.

We have re-deployed the site.
The new password is "deleted"
Same user as before

#1168628

I changed the Archives Filter to "Mostra solo le opzioni disponibili per ogni input > Nascondi", so to see the issue again, and changed pagination to 6. There was no pagination so I added it.

Now, if you load hidden link you will see several options in the Select "Anno" Field but as soon you paginate, you see fewer, and others.

I deactivated all plugins (unless the required and the WordFence one), as well, I changed the theme.

Nothing again changed the issue so I was ready to apply the trick suggested by my colleagues, to remove option "icl_sitepress_settings" in the options table of test_studiogiochi_com_options (rename it).
I did that, but the site still had all options saved, so the database connected to it is not test_studiogiochi_com_options.

Can you ensure the right database is connected in the wp-config.php?
The FTP Access data I have seem incorrect in the password.

#1168741

Hello,
I have checked wp-config.php: it seems fine and I was able to edit (rename "icl_sitepress_settings" to "_icl_sitepress_settings") by using ARI Adminer, so can you just check again? Otherwise, I could create for you a phpMyAdmin account.

Anyway, after doing that change, and following from scratch the WPML setting up procedure, it looks like all translated content is now "hanging". It is not recognized as English and thus it's mingled with Italian content; the filter values are duplicated and so on.

So, is it possible to set up WPML again without losing all the previous work?

If needed, I'll redeploy the DB again

Carlo (ELAN42)

#1169564

This is rather strange.
Additionally, now I cannot log in anymore with the provided data, it states "The username or password you entered is incorrect"
This again sounds like another database is connected, here.

Note that I had saved the contents of icl_sitepress_settings (of the test_ database) safely in case we need them.

However, I cannot proceed anymore given the login issue.
Can you restore those?

Additionally, I understand for you it is a quick move to re-deploy the database (and files).
It is strange because all our temptations to restore backups of your site failed with errors.
Is it possible to:
- restore access to the testing site
- restore it's database (once again)
- submit be that Database Export, and/if possible the zipped FTP (or, if you use Tools like Duplicator or others, I can work with those files as well).

If I manage to see this issue on a local duplicate of your site, I can escalate this as an exceptional issue to the developers and ask direct help - because I suspect, deep down this is not an exception.
Without a duplicate, it is difficult to do this, but we could as a last resort let the developer have a direct look into the staging site, however that is the least desired, as fixing issues with this approach can be almost impossible.

Please let me know if you could help me with the above - I will do my best to expedite this as much I can thereafter.
I enabled all private replies, in case you need to use them.

#1170434

- Sorry for the user permissions! You are now admin and I set your user language to English.

- About the dysfunctional "Avanti" Button: yes, I noticed that, but you can simply solve by going Back and then Forward again. Italian will now appear as selected and you just have to add English.

We'll discuss some more and let you know about the rest in a few hours.

Thank you very much!

#1170446

OK great, thank you.

Can I ask you one last question, and sorry if it was answered already:
Since when does this issue with the filter happen?

#1170449

The issue has always been there, since we first created the filters.

#1170470

Great. I will let you know when this issue is solved

#1170503

We can't understand this point:

"It seems you have a relationship between posts and pubblicazioni, which is the cause for this".

We should not have any kind of relationship between the custom post type "Pubblicazioni" and the WP standard "Posts". Can you please clarify?

#1170514

This is strange, there are definitely relationships stored in the database, however with missing columns, that is why the error and why not displaying on the Toolset > Relationships table.

Was this database reconstructed from another or more than one?

#1170546

The database was not reconstructed, but we have been working on this website for a long time and at the beginning our knowledge of Toolset was quite limited, so it could be that in the DB there are things which should have never been created in the first place.

How could we clean it?

#1171131

I understand.

What I would suggest if you want to "clean up" the site, is the following:

- create a fresh, staging (local, eventually) vanilla instance of WordPress with Toolset.
- Install the Module Manager Plugin on your existing site, or export the Types, Views and other elements you need in Toolset > Export. If you use Module Manager, you can create modules of your elements and export those: https://toolset.com/documentation/user-guides/using-toolset-module-manager/. It's generally a good development tool.
- After you have the modules or exports, import them on the vanilla local site.
- With the WordPress exporter (Native Tools > Export and Tools > Import) you can export and import the actual values (posts, fields, terms) of the posts (also custom) and re-import them locally.
==> Note, if you want to clean up things in the posts, or elsewhere, do it before you export the contents (eventually, on a duplicate of the production site, and then, export from there)
==> The idea is to end up with a fresh install, featuring the old content.

Related to languages, this requires that WPML later, on the new install knows how to connect the existing translated posts.
This should be possible, but I would suggest planning this ahead, as I can answer for Toolset confidently but for WPML I would suggest asking the specialists first. I know that one can manage multilingual exports, as shown here: https://wpml.org/documentation/plugins-compatibility/export-multilingual-websites-using-wp-all-export-wpml/
I would, however, clarify the steps first with a WPML specialist directly in the forums.

For Toolset, after you did above, your new site should be a one to one copy to the old site, and this should not take longer than a few hours of work - after you have a fresh database and the old content on it, whereas no issues should happen.
Of course, I would suggest testing known issues after every nth step you do in the process, so maybe you can spot (in case it comes back) what produces the problems.
However, given you will import "just content and structure" to a fresh Database you should end up with a clean of error site.

This is what I would do, however, I will not stop working on this issue just because one could correct the error with a scratch.
We still need to know what happened and why.
We are working on this, I can however not promise that we can provide a solution before the coming festivities, I fear.

#1171213

Hello

1. The issue with the database error is due to the missing database column autodelete_intermediary - this issue is not solved by adding that column manually as it usually is, and I am waiting for the Types developer to let me know if and how we can fix this.
It might be due to migration. Did you migrate the site (database) at some point?
In any case, as we have the solution to this I will let you know.

The relationships where all created with the new methods, so here is what I suspect happened:
- you tried to create relationships
- nothing happened, the list staid empty (due to the error)
- you eventually gave up adding "Relationships" and that's why there are a few leftovers

That would explain why there are relationships but you mention do not have any. We will find the solution to this missing column issue and bring it back working on your site as well (where, this feature is dysfunctional, at the moment)

2. The issue with the Search options is positively and confirmed, solved on the database dump I received from you.

This is what I did:
- I tested several old plugin versions to confirm, this issue was present since ever
- 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
- I was asked to update the database (button to click, from WPML)
- I had to reset the Language in Folders and the Language Switchers. I had to resave permalinks and I went to the WPML > Troubleshooting page to run thru (note, that might not be needed and be careful with):
-- Corregge il confronto della colonna element_type in icl_translations nel caso in cui questa impostazione venga modificata per la colonna posts.post_type.
-- Aggiunge informazioni sulla lingua agli articoli e alle tassonomie che non includono questi dati.
-- Correggi il conteggio dei termini in caso di problemi con il contenuto tradotto.

I then loaded /en/pubblicazione/book/ and it's italian pendant, the search is not anymore affected by the pagination.
I attached here (my post is private again) BOTH Database duplicates.
This is the one I received from you and stripped down a little, so to debug it:
hidden link
This is the one I took now, after the steps I outlined above, and hence, the working (fixed) database but still with the PHP error, that will require Developers to look at, as explained:
hidden link

This database could help to re-instantiate a fresh copy of the site or to see how it is working after the sitepress options are re-created.
Please let me know if you see any issues with that - I would otherwise suggest trying that on a staging site to apply it later on your live site.

I will update you as soon I have news about the missing column error of Types.

#1171677
Add 1 Column, Go.png
Enter name autodelete_intermediary.png
Click on Structure.png

The second issue is solved as well (the relationships error) by following these precise steps.

1. Open your database (try first on staging) and pay attention to what tables you edit, because you have both the testing and staging site's database mixed as tables in the same database. I would change this and use 2 bases if I can recommend this, I myself fell into the pitfall of editing the wrong tables.

2. Find the table of "toolset_relationships" (pay attention to NOT edit the WRONG database table!) and open it with PHP myAdmin

3. Click on "Structure"

4. Scroll down and find "Add Column(s) after/before" section just below the table

5. Choose to "Add 1 after is_active"

6. Press "go" and then enter the name of the column: autodelete_intermediary

7. Press save

That should be it, the error should be solved and you will see all the Post Relationships you have created in Toolset > Relationships.

This, along with above Database fix for WPML (renaming, and recreating WPML settings) should bring a solution to the issues reported.

Our developers are investigating your Database, to find out if any issue in Types made the missed column disappear, and I will feedback here, in case there is any news about that.