backdrop-contrib / coder_upgrade

Helps automate some/most of the work required to upgrade a module from Drupal to Backdrop 1.x
GNU General Public License v2.0
4 stars 7 forks source link

A minor error seen, wrong status in conversion.inc #78

Closed slackstone closed 1 year ago

slackstone commented 1 year ago

+573 ... coder_upgrade/includes/conversion.inc

When running this module I was seeing the enclosed error. Checking the status column in my system table, it looks like I have 0, not an expected -1. On line 562 of conversion.inc. if I change -1 to 0 everything seems to work as expected.

Error SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT name, filename, type, status, info, REPLACE(filename, CONCAT('/', name, '.', type), '') AS directory FROM {system} WHERE type = 'module' AND filename NOT LIKE 'core/%' ORDER BY directory, name; Array ( [:status] => -1 )

slackstone commented 1 year ago

Please scratch my last comment, I did not get this working. (I just cleared to error for a moment.) I think this may be related to my PHP version. I ran this on site with Version: 8.1.12.

bugfolder commented 1 year ago

It's a logic error in the code. PR to follow shortly.

bugfolder commented 1 year ago

@slackstone, can you test the PR https://github.com/backdrop-contrib/coder_upgrade/pull/79 and confirm that it fixes the error for you?

slackstone commented 1 year ago

After pulling down #79 I may have a new error now. Standby while I investigate / confirm. The error may a cascade; not related to this PR. I'll try to confirm best I can.

TypeError: set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, class PGPParser does not have a method "exception_handler" in set_exception_handler() (line 107 of ... backdrop/modules/coder_upgrade/grammar_parser/parser.inc).

error

slackstone commented 1 year ago

I did a reset on my end, cleaning the input directories and verifying permissions. With a clean reset, and after confirming the code in the the patch, I am now able to get to the config screen as expected. I still need to try upgrading some module, but I'm a lot further now. Nice job @bugfolder Thanks for the follow up and potential fix!

bugfolder commented 1 year ago

Sounds good. Thanks, @slackstone, for flagging it and testing! New bugfix release is out.