Skip Navigation

[Resuelto] Views is not updating itself, not showing the correct post

This support ticket is created hace 4 años, 9 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: ,

Este tema contiene 16 respuestas, tiene 2 mensajes.

Última actualización por Nigel hace 4 años, 8 meses.

Asistido por: Nigel.

Autor
Mensajes
#1538501

Hi,

I have views with Custom field filters. These are simple checkbox fields with values 0 or 1. If the field is equal to 1, than the views shows the chosen posts.

It was working properly in the past years, but with the latest versions, they are not updating. So if I set the checkbox field for a post, it will be not displayed by the views or if I remove the checkbox, the post will be still displayed.

If I edit the views, just modify something and than undo it and save again, the views will show the right posts.

I have checked, if it is related to cache, but it is not. I'm testing it on staging also, where cache is disabled.

This is the website, where you can see the problem:
enlace oculto

There is a hero position at the top of the page. You can see the "Ezek voltak 2017-ben a világ legnépszerűbb múzeumi kiállításai" post there, but it should not be shown, as I disabled the "Bejegyzés Hero" checkbox, which is responsible for that view. Only posts, that has this option checked should be displayed in the "Home - Hero" view.

It is happening only since there was a problem with the WordPress Archives, that was reported by me here:
https://toolset.com/forums/topic/views-wordpress-archives-have-some-issue-with-html-rendering/

I don't know, if it is related to that issue, but the problems appeared at the same time, when that version came out.

If you need access to my staging, I can give you, just let me know.

#1539027

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Screenshot 2020-03-04 at 14.30.40.png

Hi Peter

Recent versions have included some work on the internal caching of Views (unrelated to any other caching mechanisms you may be using) so it could be related to that.

But on the link you shared I don't see the problem (screenshot), I can't locate the hero section you describe.

I can take a look at your site—I'll set up a private reply for credentials for the staging site—but you'll need to point me to a page where I can see the problem.

#1540853

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Screenshot 2020-03-05 at 13.49.38.png

I can see the issue on your site.

I did some testing locally to check whether I can reproduce the problem, but I cannot.

I don't think it is related to the Views caching mechanism, because upon checking I see that saving a post with a custom field used in a Views query filter clears the cache for that View.

You can see in the screenshot that saving the post used in the hero is enough to reset the caches for the affected Views.

But there is something odd happening on your site.

When I went to turn on debugging mode (at Toolset > Settings > Front-end content) the problem disappears. Yes, simply activating debugging mode. Turn off debug mode and the problem re-appears. (Which means the debug mode can't help as it only shows the View details when it is working.)

So, I went to take a copy of your site, but don't have rights to add a backup plugin.

WPEngine doesn't allow Duplicator, so could you please create an archive using All in One WP Migration (you can exclude the media files to keep the size down) and share a link to it (e.g. on dropbox) here (the link will be hidden from other users).

#1542669

I can create a simple backup and share the link of it. Is it also good for you?

#1544095

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Please use the All in One WP Migration plugin to create a backup (it is very simple to use), choosing the "advanced" option to exclude the media library, which will limit the file size.

You can then post a link to the archive file shared somewhere like dropbox, or save that step and simply copy and paste the download link for the archive file directly on your server (from All in One WP Migration > Backups).

I'll let you know when I have downloaded it, and you can then delete it.

You can paste the URL here, it will be hidden from other users.

#1544185

Here is the link for the link of the backup:
enlace oculto

The link can be opened only once!

#1544295

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

I tried to download the file from that link but it fails, not sure why, so I went back to your staging site (a different URL) to download it directly from there, but the plugin isn't installed.

Could I ask you to install the plugin on the staging site and I'll create and take the backup myself?

#1544323

I've installed the plugin on the staging.

#1544477

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Thank you.

I installed a copy of your site locally. I went back to your staging site to double-check what was required to demonstrate the issue, and now I don't seem to be able to reproduce it (on your site).

I tried changing a different post to the hero, and it correctly shows at the top without being repeated in the next section.

Has something changed on this staging site since before the weekend? Some difference in which plugins are active, or similar?

Can you confirm whether or not you are able to see the issue now?

#1545023

I can confirm, that it is working on staging. I have tested it on live site and it is working there also. There was no change or update on staging, but there was some plugins updated on live site since then.

Maybe WP Engine did something on server level. I don't know, but it seems, everything is working as expected.

Thank you for your support!

#1552043

The problem is back. The Views are not working, not showing the actual loop. And another website is having issues regarding this problem. The View is breaking another plugin's look, because it is caching it and not loading the css and js for that plugin. Cleaning the cache solves the issue, but only for a time, it comes back soon.

Here is the website, where you can see the issue:
enlace oculto

The "TERMÉKEK" sidebar is actually an accordion menu, but you can see, that it is broken.

So it is still a problem and my clients are waiting for the solution.

#1552403

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

I had deleted my copy of your site, so I've re-installed it now for testing.

I'll try to reproduce the problem.

Are there any particular actions I need to take to trigger it that you are aware of?

Also, please confirm what if any caching mechanisms you have operative on your site, server caching, caching via plugins, etc.

I'm not sure what I'm supposed to be looking at in your last link.

#1556811

> Are there any particular actions I need to take to trigger it that you are aware of?

No special actions needed. The front-end has many Views and they are not updating. Old posts are still showing and new posts are not showing in the loops.

> Also, please confirm what if any caching mechanisms you have operative on your site, server caching, caching via plugins, etc.

artportal.hu is on WP Engine, using its own caching mechanism.
nutriciamedical.hu is on Closte, using LiteSpeed cache.

> I'm not sure what I'm supposed to be looking at in your last link.

As I have written, the "TERMÉKEK" sidebar widget should be an accordion menu. Is it an accordion menu for you? It is just a list of links for me and it is unformatted.

I can create a staging site again, but as the last time, it will work on the staging. The live site "bug" is very important to fix asap.

#1557183

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

The sidebar issue on a different site seems to be an unrelated issue, please open a new thread about that giving details of how the page is set up and what generates the accordion.

Regarding the caching problem, I have retried this on my local copy of your site, and it works entirely as expected.

I have one tab open (which I keep refreshing) where I list the Views, and where I can see if it is cached or not.

Loading the home page (and therefore Views such as Home - Hero) generates cached versions of the Views on the home page.

As soon as I make a change to a post (e.g. to the checkbox that specifies whether it is a hero or not) the cache of the affected View is cleared, and the page on the front end displays the expected results.

Likewise, if I publish a new post it clears the cache of the affected Views.

So it would appear to be related to the server caching. I will ask the Views developer for advice in a meeting I have soon and will get back to you.

#1557217

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

As you are using classic Views you can test disabling the caching for individual Views where it appears to be a problem, using the cached attribute, e.g.

[wpv-view name="home-hero" cached="off"]

(The ability to do the same with Views created with blocks will be added in the next release.)

Can you let me know if that resolves the problem?