Hi,

I notice that when removing the Facebook comment for certain node, this doesn't behave as spectated due the facebook comment block is cached.

I am attaching a patch in the next post that makes this block DRUPAL_NO_CACHE.

Comments

oriol masjuan’s picture

StatusFileSize
new586 bytes
greggles’s picture

Issue summary: View changes
Status: Active » Needs review
jerryimiolo’s picture

Status: Needs review » Needs work

Thank you for tackling the issue. The patch installed as expected but the block is still caching for me. If I turn off block caching in the configuration and view source on the page, the data-href in the fb-comments div is correct to the page. When I turn block caching back on and clear the caches, the data-href remains the same on every subsequent page I visit after the first.

Let me know if you need anymore information or if I can be of any help.

dietr_ch’s picture

Status: Needs work » Needs review
StatusFileSize
new386 bytes

There are multiple issues at work here. The block indeed gets cached per role, so all pages showing comments will show the same thread. This can be fixed using DRUPAL_CACHE_PER_PAGE. Above patch at #1 may not work because it specifies 'DRUPAL_NO_CACHE' (a string instead of the constant).

On the other hand does the block not verify whether the currently displayed node has comments enabled at all. Only the additional facebook_comments field on a node takes this into account.

I attached a new patch for the first issue (caching), caching the block per page. The second issue is in fact a separate bug for which a new issue has to be opened.

Dietrich

jerryimiolo’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that patch #4 works. Thanks Dietrich.

glass.dimly’s picture

Hah. I can confirm this patch works... because I created an identical patch and then googled for this issue to upload it.

  • wmostrey committed 981f90d on 7.x-1.x authored by dietr_ch
    Issue #2039747 by omasjuan, dietr_ch: Facebook comments block gets...
wmostrey’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.