backdrop-contrib / tca

Grant access to content using a URL access token on your Backdrop CMS website
https://backdropcms.org/project/tca
GNU General Public License v2.0
1 stars 1 forks source link

TCA somehow interfering with a view by anonymous users #3

Open nattywebdev opened 4 weeks ago

nattywebdev commented 4 weeks ago

Delighted to see TCA ported to Backdrop - thank you!

I have a weird thing happening when the TCA module is enabled, but not activated for (eg) content type 'Page'. On my site, pages have a View that shows a banner image created as a Paragraph for that page. This works fine for my admin account but when viewed as Anonymous, the View (banner image) is not displayed. If I disable the TCA module, all works fine. Re-enable it and the View is hidden again.

I'd really like to use the TCA module as it fits perfectly a particular use case. Can you suggest what might be going on here? Or where to look to find further clues?

yorkshire-pudding commented 4 weeks ago

I'm a bit confused by the combination of View and Paragraph. Please can you provide more details of how this is defined. I'd like to try and reproduce so I can see if this is a bug, or just needs guidance.

Detailed steps to reproduce would be helpful. If this is a publicly available site (even if not live), please can you share the URL, privately on Zulip would be fine.

nattywebdev commented 4 weeks ago

It's a single Paragraph of type 'banner', which comprises image, page title and subtitle. Originally it was built with a Field Collection, but I changed it for this site to use Paragraphs as that was more consistent (and meant I could remove Field Collections). The problem was there when the node type was using Field Collections, and I switched to Paragraphs as that was my intention. As you might guess, this is a D7 upgrade. I'll share the site details in Zulip.

The View is used to display the single Paragraph (banner) at the region called 'Top' at the top of the page, if one exists; for Layouts I'm using Harris (flexible).

nattywebdev commented 4 weeks ago

Reports > Recent Log messages shows this line, which might be pertinent: Exception in Banner paragraph[banner_paragraph]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node.tca_active' in 'field list'

yorkshire-pudding commented 4 weeks ago

I'm going to try and reproduce this.

yorkshire-pudding commented 4 weeks ago

Point of clarification for reproducing this: How is the paragraph banner item disabled from view as part of the paragraphs field?

nattywebdev commented 4 weeks ago

Like so: image

nattywebdev commented 4 weeks ago

Doesn't show there but the 'Banner' is a Paragraphs field with just one Paragraph Type enabled (named as 'Banner').

yorkshire-pudding commented 4 weeks ago

I can't reproduce this with the information given here and in Zulip. My steps:

  1. create content type with paragraphs field and other field (i.e. body) - Don't enable TCA for this content type
  2. Hide the para field from display
  3. create "banner" para type with image and caption
  4. create test node with a banner and content
  5. create view block
  6. Add block to layout
  7. View page

I wonder if something else is happening here

Images **View** ![image](https://github.com/user-attachments/assets/00b343a4-5823-4173-9a28-e9951a71e0f9) **Logged in** ![image](https://github.com/user-attachments/assets/e31db482-a4f4-4a66-a661-d50c7631ee20) **Anon** ![image](https://github.com/user-attachments/assets/7f40bea7-4b0b-40ad-9412-b39f1f26dc72)
nattywebdev commented 4 weeks ago

Yes, I suspect it might be. Another inherited site upgraded from D7. Frustrating!