CORE-POS / IS4C

Cooperative Operational Retail Environment
http://www.core-pos.com
GNU General Public License v2.0
63 stars 44 forks source link

AjaxParser callback error #1184

Closed lgedgar closed 1 year ago

lgedgar commented 1 year ago

latest

Lane

Bug Report

With what I believe is a "vanilla" install, after cashier login to the lane, an error is shown on screen (otherwise screen looks normal):

Error: COREPOS\pos\ajax\AjaxParser is not correct for the file /srv/corepos/upstream/IS4C/pos/is4c-nf/gui-modules/pos2.php 

This is a relatively new issue, apparently introduced in https://github.com/CORE-POS/IS4C/commit/4d64a5cb8b7908f9893a2ff48baa7eac40be6dbf - that mentions a Poser config issue but in my case there is no Poser path configured.

Have tried to identify the real "problem" but so far coming up short. It kind of seems like when the lane page loads (after login), there is just one failing AJAX call, resulting in the error, but after that the scale polling AJAX starts running okay.

So wondering if you can offer any clues? Reasonably sure it's not a local setup issue, but who knows..

gohanman commented 1 year ago

The issue I had run into was from https://github.com/CORE-POS/IS4C/blob/master/pos/is4c-nf/lib/AutoLoader.php#L272-L291 and it was returning the namespaced path w/ a Poser prefix.

Presumably it's harmless. All I did in that commit is change a silent failure to a logged failure. Whatever's happening on pos2.php to trigger it also wouldn't have done anything previously.

lgedgar commented 1 year ago

https://github.com/CORE-POS/IS4C/commit/4d64a5cb8b7908f9893a2ff48baa7eac40be6dbf adds logging but also echo to output stream, hence it's showing up on the page. Is it reasonable to just keep logging but ditch the echo? I'm not aware of anything misbehaving, just seeing the error on-screen and not sure why..

gohanman commented 1 year ago

Fair point, that seems like the simplest fix. b039ea5320fdc8c4f088d650279fa7a9d53eff29

lgedgar commented 1 year ago

That fixes, thanks.