found some remnants of "C4::Context->config('demo')": in /svc/config/systempreferences line 68: `unless ( C4::Context->config('demo') ) { ... ` this "demo" was removed everywhere so should be removed in svc/config/systempreferences too
also to note maybe for separate tickets later (needs to be analyzed): this `unless ( C4::Context->config('demo') ) { ... ` it's never failed because it returns _REFERENCE_TO_HASH_, even the hash is empty: ``` sub set_preferences { warn C4::Context->config( 'demo' ); warn C4::Context->config( 'demo' ) ? 'TRUTH' : 'FALSE'; warn Dumper(C4::Context->config( 'demo' )); unless ( C4::Context->config('demo') ) { ... ``` Gives: [2021/09/20 10:42:56] [WARN] HASH(0x5646ead56e00) [2021/09/20 10:42:56] [WARN] TRUTH [2021/09/20 10:42:56] [WARN] $VAR1 = {}; We might have other "if/unless ->config" usages not even for the "demo" key in our code which might be degraded with this "always true" trick.
Created attachment 125051 [details] [review] Bug 29056: Remove the demo functionality leftovers Remove forgotten code of the old legacy demo functionality that was removed from elsewhere except systempreferences, this code not only serves no purpose but also is causing some troubles for our customers.
Created attachment 125255 [details] [review] Bug 29056: Remove the demo functionality leftovers Remove forgotten code of the old legacy demo functionality that was removed from elsewhere except systempreferences, this code not only serves no purpose but also is causing some troubles for our customers. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 125305 [details] [review] Bug 29056: Remove the demo functionality leftovers Remove forgotten code of the old legacy demo functionality that was removed from elsewhere except systempreferences, this code not only serves no purpose but also is causing some troubles for our customers. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Passing QA. @nugged: I wonder how you were able to get C4::Context->config return an empty hash, it seems like somehow somewhere that code didn't manage to find a configuration file or there is a bug in the C4::Context code. Would love to hear more about this in case it turns out to be a bug in C4::Context.
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.05
Pushed to 20.11.x for 20.11.11 Leftovers are always served cold with ketchup ^^
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.