backdrop-contrib / feeds_jsonpath_parser

Feeds JSONPath Parser
GNU General Public License v2.0
0 stars 5 forks source link

Wrong path to bundled library (causes fatal error) #21

Open NumerousHats opened 1 month ago

NumerousHats commented 1 month ago

I installed this module using the standard process (Functionality => Install new modules on a running Backdrop site), but enabling it causes the following error no matter what page I visit:

Failed opening required '/var/www/html/modules/feeds_jsonpath_parser/libraries/jsonpath/src/JSONPath.php' (include_path='.:/usr/share/php')

I disabled the module with bee, which got the site back.

I noticed that the capitalization of the path in the error message is wrong. It should be /modules/feeds_jsonpath_parser/libraries/JSONPath/src not /modules/feeds_jsonpath_parser/libraries/jsonpath/src. Making that change in the feeds_jsonpath_parser_autoload_info function seems to fix the problem. I have created a pull request with the changes.

NumerousHats commented 1 month ago

Pull request #20

NumerousHats commented 1 month ago

Interestingly, spinning up a demo site on https://backdropcms.org/demo and enabling this module does not create this problem. I'm assuming it's because the demo site installs version 1.0.1, not the current version.

NumerousHats commented 1 month ago

The demo site generator must have just updated to using the current version of this module between yesterday and now. Now it's broken there, too.

herbdool commented 1 month ago

Those lines were just changed in the latest commit so I'm wondering if @jenlampton meant to also change the folder to lowercase in the same commit but it got left out accidentally.

jenlampton commented 1 month ago

I probably did, but since what's in there now is lowercase and the PR matches that, I've merged it in the interest in getting a release out right away. I have no preference for case :)

jenlampton commented 1 month ago

The new release is out: https://github.com/backdrop-contrib/feeds_jsonpath_parser/releases/download/1.x-1.2.2/feeds_jsonpath_parser.zip Sorry for the oversight, and thanks for the quick PR!

indigoxela commented 1 month ago

Release https://github.com/backdrop-contrib/feeds_jsonpath_parser/releases/tag/1.x-1.2.2 doesn't contain the fix.

Edit: this has been fixed.

laryn commented 1 month ago

I think there are a few more tweaks needed in the autoload function which will solve the other issue that @NumerousHats was having (as reported in the forum). Reopening and I'll file a follow-up PR.