victorjonsson / Arlima

Article List Manager - Wordpress plugin suitable for online newspapers that's in need of a fully customizable front page
28 stars 16 forks source link

Preview functionality does not work #46

Closed benjitavos closed 10 years ago

benjitavos commented 10 years ago

On the Arlima Manage lists view, after performing some changes (e.g, changing format, adding label, changing title etc.) the user have to save changes to view it, user can't preview change without saving it (by using the "Preview list" functionality).

Arlima version deployed: 3.0 beta 34

victorjonsson commented 10 years ago

Hm... are you sure that the list is connected to a page?

benjitavos commented 10 years ago

Yes, completely sure. It is connected to our main page. By performing changes and saving everything works great, its only the preview that fails.

It can be added that the preview functionality as such works, a new window is opened with the the preview showing up. But the changes made are not reflected in the preview window. Changes are visible in the list manager view, e.g., title change etc, but not in preview mode.

victorjonsson commented 10 years ago

Okey, do you have any cache plugin installed?

benjitavos commented 10 years ago

We are using Varnish. We tested running with a cache busting query string in the URL but we get the same result. So it doesn't seem to be related to any cache strategies.

benjitavos commented 10 years ago

Any luck figuring out why this is not working properly @victorjonsson?

victorjonsson commented 10 years ago

I have not been able to reproduce this error. My first guess would be that this is caused by Varnish, showing you a cached version of the page. I know you say that you have ruled this out but I'm not sure... :)

I'm really grasping for straws here...

chredd commented 10 years ago

Test, can you see this?

On Tuesday, July 22, 2014, Victor Jonsson notifications@github.com wrote:

I have not been able to reproduce this error. My first guess would be that this is caused by Varnish, showing you a cached version of the page. I know you say that you have ruled this out but I'm not sure... :)

  • Are you using custom code to display the list?
  • Does the page, that the list is connected to, display more than one list? Maybe in a sidebar?
  • Do you have any plugin installed that changes WordPress internal caching somehow?
  • Do you have any plugin installed that in any way alters the internal behavior of WordPress?

I'm really grasping for straws here...

— Reply to this email directly or view it on GitHub https://github.com/victorjonsson/Arlima/issues/46#issuecomment-49729940.

MVH Christoffer Larsson @chredd

drawski commented 10 years ago

Thanks @victorjonsson for your suggestions. It turned out that the reason was in our custom code to display the list. We use Arlima_ListFactory to render the list and we skipped last two arguments in loadList() method. That's why the preview mode was never triggered.

victorjonsson commented 10 years ago

Great!

Small tip: Avoid using the Arlima classes as much as possible and instead try to rely on the template functions. These functions are maintained with backwards compatibility in mind and are in general better documented, both in the code and on the wiki. A change in how the arlima classes is instantiated and used may not be documented outside the code.

@chredd We see you :)