RichFilemanager icon indicating copy to clipboard operation
RichFilemanager copied to clipboard

E_INVALID_PAR_TYPE error while loading

Open Draghmar opened this issue 6 years ago • 2 comments

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

  • [x] I have read and understood the Wiki. Especially deploy and configuration articles.
  • [x] I have checked that the bug I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • [x] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • [x] 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.
  • [x] 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):

  • [x] PHP connector by servocoder

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

  • [x] 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 avatar Aug 08 '19 11:08 Draghmar

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?

Draghmar avatar Aug 09 '19 07:08 Draghmar

Thanks @Draghmar. This resolves my issue.

javedharis avatar Dec 30 '19 05:12 javedharis