If I use another field (body_reloaded eg) of type long text and summary instead default body field, I get a parsing error:
Thank you!
[toc on_off::hide=0 on_off::automatic=0 on_off::min_limit=5 box::title=Table+of+Contents box::minlevel=1 box::maxlevel=1 box::hide_show=1 box::collapsed=0 header::id_strip::digits=0 header::id_strip::dashes=0 header::id_strip::periods=0 header::id_strip::underscores=0 header::id_strip::colons=0 header::id_prefix=hdr header::id_sep=- header::id_gen=title header::allowed=%3Cem%3E+%3Ci%3E+%3Cstrong%3E+%3Cb%3E+%3Cu%3E+%3Cdel%3E+%3Cins%3E+%3Csub%3E+%3Csup%3E+%3Ccite%3E+%3Cstrike%3E+%3Cs%3E+%3Ctt%3E+%3Cspan%3E+%3Cfont%3E+%3Cabbr%3E+%3Cacronym%3E+%3Cdfn%3E+%3Cq%3E+%3Cbdo%3E+%3Cbig%3E+%3Csmall%3E back_to_top::label= back_to_top::location=bottom back_to_top::minlevel=1 back_to_top::maxlevel=1 back_to_top::anchor=toc back_to_top::scroll=0 numbering::method=0 numbering::headers=0 numbering::mode=0 numbering::prefix= numbering::separator=. numbering::suffix=. on_off::hide=0 on_off::automatic=0 on_off::min_limit=5 box::title=Table+of+Contents box::minlevel=1 box::maxlevel=1 box::hide_show=1 box::collapsed=0 header::id_strip::digits=0 header::id_strip::dashes=0 header::id_strip::periods=0 header::id_strip::underscores=0 header::id_strip::colons=0 header::id_prefix=hdr header::id_sep=- header::id_gen=title header::allowed=%3Cem%3E+%3Ci%3E+%3Cstrong%3E+%3Cb%3E+%3Cu%3E+%3Cdel%3E+%3Cins%3E+%3Csub%3E+%3Csup%3E+%3Ccite%3E+%3Cstrike%3E+%3Cs%3E+%3Ctt%3E+%3Cspan%3E+%3Cfont%3E+%3Cabbr%3E+%3Cacronym%3E+%3Cdfn%3E+%3Cq%3E+%3Cbdo%3E+%3Cbig%3E+%3Csmall%3E back_to_top::label= back_to_top::location=bottom back_to_top::minlevel=1 back_to_top::maxlevel=1 back_to_top::anchor=toc back_to_top::scroll=0 numbering::method=0 numbering::headers=0 numbering::mode=0 numbering::prefix= numbering::separator=. numbering::suffix=. ]

Comments

azin’s picture

@EuroDomenii, did you solve this? I also get this, and multiple times when I have additional fields.

Drupa1ish’s picture

Sorry, I didn't investigate further, is was good enough for me with one body field.

fgm’s picture

It seems the module only works when there is not more than one text field on the entity.

Drupa1ish’s picture

@fgm in #3 is right. The problem is only for the automatic table of content use case, with more than one text field on the entity.

Here is the explanation:

Patch attached.

Drupa1ish’s picture

Status: Active » Needs review

Works also with comment text fields

furamag’s picture

Status: Needs review » Reviewed & tested by the community

I just tested patch #4. It works fine. Can we push these changes to the latest dev version?

  • ba1eacb committed on 7.x-2.x
    Issue #1914198 by EuroDomenii: Fix for hook_field_attach_view_alter to...
furamag’s picture

I just applied patch from #4 and committed fixed code. Please reopen this ticket if you find any other bug.

furamag’s picture

Status: Reviewed & tested by the community » Fixed
furamag’s picture

Status: Fixed » Closed (fixed)