LedgerSMB
The foundation for your business
Fork me on GitHub
[ledgersmb-users] Re: Replacement of tokens in SQL files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ledgersmb-users] Re: Replacement of tokens in SQL files



Hi Pete,

On Thu, Apr 16, 2020 at 2:48 PM Pete Houston <..hidden..> wrote:
Hello,

I'm trying to upgrade an ancient LSMB (1.2.26) to a slightly less
ancient one (1.3.47) and the upgrade is not going smoothly, as you might
imagine.

Upgrading from 1.2 to something newer than 1.3 isn't available, I think, but I'd like to urge you to pick something newer: 1.3 hasn't had any maintenance for *years* -- if you'd pick something not too recent, like 1.6, at least you'd be able to fall back on the community support for help and maintenance. With 1.3, no more fixes will be coming...

Is there anything we (the project) can help you with that would allow you to pick a newer version?
 

This error is present in the database log:

2020-04-16 11:42:42 BST ERROR:  role "lsmb_<?lsmb dbname ?>__part_edit" does not exist
2020-04-16 11:42:42 BST STATEMENT:  GRANT "lsmb_testbooks__file_read" TO "lsmb_<?lsmb dbname ?>__part_edit";

which seems to relate to line 707 in sql/modules/Roles.sql:

GRANT "lsmb_<?lsmb dbname ?>__file_read" TO "lsmb_<?lsmb dbname ?>__part_edit";

So, it looks like the substitution of the second dbname token in that
line is not happening.

Can you suggest any reason why that might be and how/where I should go
about fixing it?

The problem stems from this line: https://github.com/ledgersmb/LedgerSMB/blob/1.3/LedgerSMB/Database.pm#L674

There, the regex should have a 'g' at the end: s/.../.../g. With this "g", all occurrances in the string will be replaced instead of only the first one.


 

Thanks very much,

Pete
--
Openstrike - improving business through open source
https://www.openstrike.co.uk/ or call 01722 770036
_______________________________________________
users mailing list -- ..hidden..
To unsubscribe send an email to ..hidden..

Regards,


--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
_______________________________________________
users mailing list -- ..hidden..
To unsubscribe send an email to ..hidden..