1# Patch Information for Older Version 2 3Older versions of DokuWiki require a patch to use this plugin. 4 5(Versions 2017-02-19 "Frusterick Manners" and older.) 6 7## PATCH 1: Resolving problems with toolbar header buttons 8 9NOTE: This fix was merged into Dokuwiki core as of Oct, 10 2019. So new versions of Dokuwiki released after that date will not need this patch. 10 11The header buttons in the editor toolbar are not working. 12 13Here is the patch for version 2017-02-19b+: 14 15```diff 16--- \lib\scripts\edit-original.js 17+++ \lib\scripts\edit.js 18@@ -143,16 +143,17 @@ 19 * @author Andreas Gohr <gohr@cosmocode.de> 20 */ 21 function currentHeadlineLevel(textboxId){ 22 var field = jQuery('#' + textboxId)[0], 23 s = false, 24 opts = [field.value.substr(0,getSelection(field).start)]; 25- if (field.form.prefix) { 26- // we need to look in prefix context 27- opts.push(field.form.prefix.value); 28- } 29+ //if (field.form.prefix) { // Dokucrypt Plugin Mod 30+ if (field.form && field.form.prefix) { // Dokucrypt Plugin Mod 31+ // we need to look in prefix context 32+ opts.push(field.form.prefix.value); 33+ } 34 35 jQuery.each(opts, function (_, opt) { 36 // Check whether there is a headline in the given string 37 var str = "\n" + opt, 38 lasthl = str.lastIndexOf("\n=="); 39 if (lasthl !== -1) { 40``` 41 42**Manual Patch Instructions** 43 441. In the file /lib/scripts.edit.js 452. Find the section: function currentHeadlineLevel(textboxId){ 463. Inside that section (function), find: if (field.form.prefix) { 474. Change it to: if (field.form && field.form.prefix) { 485. That's it. 49 50You may need to shift+refresh the page after changing this file. 51