Jump to content

Emmerich

Members
  • Posts

    1
  • Joined

  • Last visited

Emmerich's Achievements

Starter

Starter (1/6)

0

Reputation

  1. ProcessWire: processwire-master_3.0.229 (and earlier versions) TextformatterAccordion: TextformatterAccordion-master_1.1.1 used inside InputfieldCKEditor First issue (solved): When using the originally downloaded TextformatterAccordion (v.1.1.1), I experienced a message on top of the outputted page: Notice: Array to string conversion in E:\UniServerZ\www\processwire-master\site\assets\cache\FileCompiler\site\modules\TextformatterAccordion\TextformatterAccordion.module on line 59 The line 59 is: if(empty($$accordion[0])) array_shift($accordion); I recognized a doubled '$$' before the variable 'accordion[0]', which is an operator known as "variable of variable"; but in my system I've debugged it, and it isn't a "variable of variable", it's only an array item containing text. After I removed one of the '$' operators, the line 59 changed into: if(empty($accordion[0])) array_shift($accordion); then the 'Notice' (see above) disappears and Accordion is working well :-). Second issue (solved): When there are several paragraphs in front of the Accordion part, is happens (regulary), that the last - neutral - paragraph of them is seen as (first) Accordion-item and is formatted like: Untitled Item Lorem ipsum... After inserting an extra check at the beginning of the 'foreach'-loop (lines marked with "ESB") of ...\www\processwire-master\site\modules\TextformatterAccordion\TextformatterAccordion.module ... foreach($accordion as $k => $v) { $pos = strpos($v, "~~~\t"); if ($pos === false){ // no accordion items in this block // ESB continue; // ESB } // ESB $title = trim(substr($v, 0, $pos)); ... , also this part of Accordion is working well. I hope, my tips are helping other users of TextformatterAccordion.
×
×
  • Create New...