Closed loadbrain closed 9 months ago
is_array... is missing in settings.tpl. see also: https://github.com/pkp/textEditorExtras/pull/21 Fixed with: ` {if $currentContext->getData('enableAnnouncements')}
<tr>
<th scope="row">{translate key="plugins.generic.textEditorExtras.setting.announcements.descriptionShort"}</th>
<td><input type="checkbox" name="additions[announcement][descriptionShort][]" value="image" {if is_array($additions.announcement.descriptionShort) && in_array('image', $additions.announcement.descriptionShort)}checked="checked"{/if}></td>
<td><input type="checkbox" name="additions[announcement][descriptionShort][]" value="code" {if is_array($additions.announcement.descriptionShort) && in_array('code', $additions.announcement.descriptionShort)}checked="checked"{/if}></td>
<td><input type="checkbox" name="additions[announcement][descriptionShort][]" value="table" {if is_array($additions.announcement.descriptionShort) && in_array('table', $additions.announcement.descriptionShort)}checked="checked"{/if}></td>
</tr>
{/if}`
@loadbrain Does this resolve issue #20?
OMP/OJS 3.4.0.4
When annocuncements are enabled and you click on settings from the plugin you get an error:
`Got error 'PHP message: PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /omp/cache/t_compile/91ff704559266117e7aac9c23546d1f88865748a^aad0d99d45f1c49794dd5f48888b070605c1db6e_0.plugins-1-plugins-generic-textEditorExtras-generic-textEditorExtras.settings.tpl.php:117 Stack trace:\n#0 /omp/cache/t_compile/91ff704559266117e7aac9c23546d1f88865748a^aad0d99d45f1c49794dd5f48888b070605c1db6e_0.plugins-1-plugins-generic-textEditorExtras-generic-textEditorExtras.settings.tpl.php(117): in_array()\n
1
/omp/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65683105dcb739_31632149()\n#2 /v /omp/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#3 /omp/lib...' ` If announcementes is disabled, everything works fine.