backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Views support is broken in 1.x-1.x branch #43

Closed sternhagel closed 4 years ago

sternhagel commented 4 years ago

When using the current 1.x-1.x branch, it's not possible anymore to show a Paragraphs field in Views. In the latest release version 1.x-1.0.1 it's working fine.

Following commit seems to break the functionality: https://github.com/backdrop-contrib/paragraphs/commit/4e6a801a597694ff14e0ca195bbb7bb4f79d7e61

Steps to reproduce:

Expected behaviour (as observed in 1.x-1.0.1):

Actual behaviour (as observed in current 1.x-1.x branch):

Warning: Theme hook "entity" not found.

laryn commented 4 years ago

Thanks @sternhagel! If you find anything else please update. I will try to look at this soon as well, and get some of these wrinkles ironed out...

laryn commented 4 years ago

@sternhagel Can you confirm that the commit referenced prevents the Paragraphs field from displaying correctly in Views, but when using the earlier code despite displaying correctly it also still shows the Warning: Theme hook "entity" not found. in the log? (ie. they seem unrelated to me)

laryn commented 4 years ago

@sternhagel It seems the warning is generated from Entity Plus, not Paragraphs so I've opened this issue: https://github.com/backdrop-contrib/entity_plus/issues/17

laryn commented 4 years ago

Pretty sure I broke the rendering while trying to solve this one: https://github.com/backdrop-contrib/paragraphs/issues/37

Just noting here to try to tie that in to this discussion.

laryn commented 4 years ago

This should be fixed with the latest entityplus branch work, including this PR on the Entity Plus module: https://github.com/backdrop-contrib/entity_plus/pull/18

sternhagel commented 4 years ago

@laryn I can confirm this is fixed in the current entityplus branch, when patching the "Entity Plus" module with said PR.

However, there's a new PHP notice I didn't get before:

Notice: Undefined variable: field_name in template_preprocess_paragraphs_item() (line 36 of [...]/modules/paragraphs/theme/paragraphs.theme.inc).

laryn commented 4 years ago

@sternhagel Good catch. Can you try this: https://github.com/backdrop-contrib/paragraphs/commit/a5d2353d2eb57824c45762af0a4c30d5726d2a36

sternhagel commented 4 years ago

@laryn Great! That commit fixes the PHP notice.