magento-2-blog icon indicating copy to clipboard operation
magento-2-blog copied to clipboard

Missing Full Page Cache support?

Open thomascharbit opened this issue 4 years ago • 5 comments

Hi,

It looks like FPC cache does not work with this module.

For instance, if i have FPC enabled and i edit a post title, it won't be updated on the post list page, unless i manually flush the cache.

Can you confirm that this is not currently supported? If yes, as FPC is getting pretty standard now with Varnish etc, are you planning to implement this?

Thanks

thomascharbit avatar Oct 17 '20 13:10 thomascharbit

First of all, thank you for contacting us. I am Onesh from Mageplaza Support Team.

I would like to let you know that the Blog module does support it. Even if FPC enables and changes the title of the post, the post still updates its title as usual.

I hope this message resolves any concerns you may have and am more than happy to answer any additional questions.

phutx avatar Oct 21 '20 03:10 phutx

Hi, thanks for your feedback, unfortunately I do have an issue with FPC.

Please see full bug report:

Preconditions (*)

  1. Magento 2.3.4
  2. MagePlaza Better Blog 3.1.3

Steps to reproduce (*)

  1. Create a blog post with title "Lorem Ipsum"
  2. Enable Full Page Cache
  3. Load post page domain.com/blog/post/lorem-ipsum.html
  4. Load posts list page domain.com/blog.html
  5. Edit same blog post and change name to "Lorem Ipsum -- updated"
  6. Check both post page and posts list page and see if the title was correctly updated

Expected result (*)

  1. On domain.com/blog/post/lorem-ipsum.html title should show "Lorem Ipsum -- updated" instead of "Lorem Ipsum"
  2. On domain.com/blog.html title should show "Lorem Ipsum -- updated" instead of "Lorem Ipsum"

Actual result (*)

  1. On domain.com/blog/post/lorem-ipsum.html title shows "Lorem Ipsum -- updated" which is correct Capture d’écran 2020-10-21 à 11 37 28

  2. On domain.com/blog.html title still shows "Lorem Ipsum", not "Lorem Ipsum -- updated which is incorrect Capture d’écran 2020-10-21 à 11 37 21

Full Page Cache should be invalidated for domain.com/blog.html and other posts list pages such as categories, topics etc when a blog post is created, updated or deleted.

Thanks for helping!

thomascharbit avatar Oct 21 '20 09:10 thomascharbit

hi, You can access the file via the following path: app/code/Mageplaza/Blog/view/frontend/layout/mpblog_post_index.xml Then add the cacheable="false" field to the block mpblog.post.list, please.

I do value your help in this matter and look forward to hearing from you soon.

phutx avatar Oct 23 '20 07:10 phutx

Hi,

Setting the block as uncacehable would simply disable FPC on this page, which might be a workaround, but i would like FPC to actually work as intended instead.

Do you plan to implement this or is this expected behavior from your point of view?

thanks.

thomascharbit avatar Oct 23 '20 12:10 thomascharbit

Hi @thomascharbit, https://github.com/mageplaza/magento-2-blog/pull/293 it fixes your issue

phutx avatar Oct 27 '20 02:10 phutx