Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#109 2020-03-09 15:07:11

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

Re: adi_notes - leave notes for Textpattern users

Activating adi_notes (v1.4beta4) gives > Monosnap

No prefs > Monosnap

Last edited by RedFox (2022-11-16 10:16:29)

Offline

#110 2020-03-09 21:51:59

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_notes - leave notes for Textpattern users

Looks like some code crappage has been exposed. Caused by a used-to-be-ok-but-now-possibly-dodgy default value for a DATETIME column.

I’ve had a fiddle, so please try adi_notes-1.4beta5

Offline

#111 2020-03-10 04:33:56

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

Re: adi_notes - leave notes for Textpattern users

Activating seems okay. But still no prefs > Monosnap

Last edited by RedFox (2022-11-16 10:15:32)

Offline

#112 2020-03-10 09:56:22

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

Re: adi_notes - leave notes for Textpattern users

I tried it on fresh installation of 4.8 on php 7.2 with MAMP and saw some of the same problems with beta5 too. There’s still an error with the last_mod database table and because it bombs there, the prefs aren’t installed, resulting in the prefs pane error.

With a bit of fiddling, I think I found a solution, or at least a pointer for you. Maybe it helps. I switched on your debug flag to get more focussed error reporting. On a fresh install with no adi_notes tables present, I get the upgrade flag and an adi_notes_old table gets made. It seems that it trips over last_mod then when doing the insert due to a default value mismatch. Maybe the “upgrade” status is triggering when it shouldn’t, resulting in a copy of a non-existent last_mod value (it tries to insert ''), so that may be one place to look that may obviate the need for any of the changes mentioned below… I’m not knowledgeable enough about the plugin operation to tell.

Otherwise, I looked at how Textpattern handles the default value for Expires as a cue:

  • In the table create routine: `last_mod` DATETIME NULL DEFAULT NULL,.
  • In the INSERT statements, all instances of ,'".$last_mod."', changed to ,".$last_mod.", (in other words I removed the single quotes around the $last_mod insert).
  • In the foreach loop of adi_notes_copy function I added a test for an absent $last_mod after the extract($row); statement, e.g.:
if (!isset($last_mod)) {
    $last_mod = "NULL";
}

This is more or less analogue to how Textpattern handles Expires except that it doesn’t set a last_mod timestamp for an empty entry.

The install then completes correctly, the prefs pane is visible, and from very brief testing I could write notes. The database has both an adi_notes and an adi_notes_old table, despite this being a fresh installation with no tables existing prior to installation. Im not sure if that is standard behaviour.


TXP Builders – finely-crafted code, design and txp

Offline

#113 2020-03-10 11:39:17

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_notes - leave notes for Textpattern users

jakob wrote #322132:

With a bit of fiddling, I think I found a solution, or at least a pointer for you. Maybe it helps.

It certainly does help! Thanks, much appreciated.

Also, it’d help if I could get the same errors – I’ll fiddle around with my SQL Mode.

Leave it with me.

Offline

#114 2020-03-10 13:12:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: adi_notes - leave notes for Textpattern users

Hi Adi,

Since you are working on this, there is also a minor issue with 1.4beta4, where the width is causing a horizontal scroll on smaller screens/browser windows.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#115 2020-03-10 22:51:17

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

Re: adi_notes - leave notes for Textpattern users

colak wrote #322137:

Since you are working on this, there is also a minor issue with 1.4beta4, where the width is causing a horizontal scroll on smaller screens/browser windows.

A wild guess, but might you be able to solve that with the Width settings in Extension › Notes Admin?


TXP Builders – finely-crafted code, design and txp

Offline

#116 2020-03-11 05:54:51

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: adi_notes - leave notes for Textpattern users

indeed. I’ve been using the plugin for so long, I forgot about the preferences.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#117 2020-03-11 07:10:38

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_notes - leave notes for Textpattern users

jakob, thank you again!

jakob/RedFox – please try the new and improved adi_notes-1.4beta5, which should fix things.

Offline

#118 2020-03-11 10:21:22

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

Re: adi_notes - leave notes for Textpattern users

Works nicely now in brief testing! Thanks adi.


TXP Builders – finely-crafted code, design and txp

Offline

#119 2020-03-12 15:06:30

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

Re: adi_notes - leave notes for Textpattern users

Thanks Adi!

Last edited by RedFox (2022-11-16 10:11:12)

Offline

#120 2020-03-13 22:26:11

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_notes - leave notes for Textpattern users

@RedFox – nearly had heart failure when a screenshot started loading … but then LOL!

Plugin deserves to escape from beta (for the moment, although still needs some Textpack work for 4.7+), so here is adi_notes-1.4.

Offline

Board footer

Powered by FluxBB