Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E_INVALID_PAR_TYPE error while loading #394

Open
7 tasks done
Draghmar opened this issue Aug 8, 2019 · 2 comments
Open
7 tasks done

E_INVALID_PAR_TYPE error while loading #394

Draghmar opened this issue Aug 8, 2019 · 2 comments

Comments

@Draghmar
Copy link

Draghmar commented Aug 8, 2019

In raising this issue, I confirm the following (please check boxes):

  • I have read and understood the Wiki. Especially deploy and configuration articles.
  • I have checked that the bug I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I realise that server-side connectors are provided by various contributors. The implementations are vary due to programming language features/limitations or other factors. Thus a particular connector may not implement, or partially implement, the API features.
  • I realise that any changes in configuration options and/or plugin parameters affect the plugin behavior. I specified all the differences from defaults in details.

I use the following server-side connector (check one):

  • PHP connector by servocoder

My familiarity with the project is as follows (check one):

  • I have used the project briefly.

On one deployment I have this annoying error:
E_INVALID_PAR_TYPE
I can't pinpoint exact culprit here but I've manage to find that in libs-main.js there are many checks and one that looks for a being [object Object] fails because it receives json string instead of json object. It looks like it wasn't converted on some point because when I take this string and put it through JSON.parse it converts without any hassle.
From what I understand it tried to load some cldr components...but because libs-main.js is minified it's hard to get where the problem starts exactly. Internet suggested that it could be something with globalize loading cldr but I don't know where to look for it...

Because I have this issue only on one machine I'm guessing it could be related to some permissions because that's what stands different on this one machine. Besides that I have no idea. Configs and such are the same on each machine.

I'm pretty sure it's related to #320

@Draghmar
Copy link
Author

Draghmar commented Aug 9, 2019

Not sure if that is the correct way of doing it but I found that changing filemanager.js to force creation of JSON object:
return [].slice.apply(arguments, [0]).map(function (result) { if(typeof result[0] == 'string') result[0] = JSON.parse(result[0]); return result[0]; });
makes this error go away and load file manager.
Could you tell if that change does not break anything?

@javedharis
Copy link

Thanks @Draghmar. This resolves my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants