Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#121 2022-03-11 11:28:50

Gallex
Member
Registered: 2006-10-08
Posts: 1,304

Re: adi_notes - leave notes for Textpattern users

i’m using ver 1.4 and got error after install:

A problem occurred while loading the plugin: adi_notes (1.4) -> 8192: Required parameter $inline_style follows optional parameter $thing on line 719
textpattern/lib/txplib_misc.php:1156 include_once()
textpattern/vendors/Textpattern/Plugin/Plugin.php:352 load_plugin()
textpattern/include/txp_plugin.php:400 Textpattern\Plugin\Plugin->changeStatus()
textpattern/include/txp_plugin.php:54 switch_status()
textpattern/index.php:230 include()

fresh install
txp 4.8.8
php 8.0

Offline

#122 2022-03-11 17:44:24

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: adi_notes - leave notes for Textpattern users

Hi Gallex,

That’s because things got a bit stricter with PHP 8+ as described here. For the moment, you’re just seeing a deprecation notice, not a full error.

And the solution, as far as I can tell is: go into /textpattern/plugins/adi_notes/ and open adi_notes.php. Go down to line 719 (where the error is showing and replace that function with this:

function adi_notes_textarea($name, $thing = '', $id = '', $rows='5', $cols='40', $inline_style='') {
// based on text_area() but with added inline style & without height & width

	$id = ($id) ? ' id="'.$id.'"' : '';
	$rows = ' rows="' . ( ($rows && is_numeric($rows)) ? $rows : '5') . '"';
	$cols = ' cols="' . ( ($cols && is_numeric($cols)) ? $cols : '40') . '"';
	$style = !empty($inline_style) ? ' style="'.$inline_style.'"' : '';
	return '<textarea'.$id.' name="'.$name.'"'.$rows.$cols.$style.'>'.txpspecialchars($thing).'</textarea>';
}

The only things that have changed are

line 719: $inline_style  ->  $inline_style=''

making $inline_style also an optional parameter, and:

line 725: ($inline_style) ? …  ->  !empty($inline_style) ? …

I’ve only briefly tested it, but it looks like it’s working fine. It should also be backwards compatible. Another solution would be to change the order of the parameters, but you then need to change it where the function is called too.


TXP Builders – finely-crafted code, design and txp

Offline

#123 2022-03-13 09:46:12

Gallex
Member
Registered: 2006-10-08
Posts: 1,304

Re: adi_notes - leave notes for Textpattern users

thank you, jakob!
i hope adi will find a time to fix this. i use this plugin a lot

Offline

#124 2023-11-23 17:52:52

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: adi_notes - leave notes for Textpattern users

Does somebody have a text file of version 1.4? Because link towards Adi’s website is dead … :(

Last edited by RedFox (2023-11-23 17:53:53)

Offline

#125 2023-11-23 19:23:44

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: adi_notes - leave notes for Textpattern users

Try downloading, this service is unknown to me, my previous one went offline.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#126 2023-11-23 22:21:19

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: adi_notes - leave notes for Textpattern users

You can also find a copy of it with my small bugfixes on my GitHub. There’s not a txt installer there but if you copy that folder into your /textpattern/plugins/ folder, then you can import it via the Admin › Plugins pane.


TXP Builders – finely-crafted code, design and txp

Offline

#127 2023-11-24 10:08:05

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: adi_notes - leave notes for Textpattern users

Mm, install gives a fatal error > Monosnap

Last edited by RedFox (2023-11-24 10:12:37)

Offline

#128 2023-11-24 17:21:54

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: adi_notes - leave notes for Textpattern users

Hi Joop, are you perhaps reinstalling adi_notes over an older version?

Also can you tell us which txp version and php version you are using?


TXP Builders – finely-crafted code, design and txp

Offline

#129 2023-11-24 22:52:07

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: adi_notes - leave notes for Textpattern users

Yes, I did … so after your post I copied all the files into the (empty) plugin folder and guess what … v1.4.1 is active … :)) … thanks!

Textpattern 4.8.8 with PHP 8.1.25

Last edited by RedFox (2023-11-25 08:13:06)

Offline

Board footer

Powered by FluxBB