Jump to content

Form json file errors

Recommended Posts

When using custom json files I'm getting this error in the fields manager when using overrides.


Warning: file_get_contents(/path/users/path/apps/path/public/contacts_grid_list.json): failed to open stream: No such file or directory in /path/users/path/apps/path/public/components/com_jreviews/jreviews/admin_controllers/fields_controller.php on line 207


Which is the loading of the files.


I take it using json file overrides for creating new forms cannot be accomplished being there are no original files with the same name and all json code must be added to the json editor?


However the file does show in the custom field Load Schema dropdown, it loads and works loading the form correctly on the submit page plus the output to the template.




Edited by DanielH

Share this post

Link to post

Checked the code quickly and you are probably right. Even though the file will be recognized and appear in the list, we have a hardcoded path in javascript for the location of the files. It's not a priority now to fix this since you do have the option of pasting the schema in the field, but we'll keep it in mind for a future update. Thanks for letting us know.

Share this post

Link to post

ok. i placed the file "business_hours_timezone.json" to this override path below:


now i want to point back the $refs to the originals:

"$ref": "/components/com_jreviews/jreviews/views/themes/default/fields_formbuilder/definitions/timezones.php",

but this does not work, the errors in the backend are not gone.

Warning: file_get_contents(/www/htdocs/root/main/business_hours_timezone.json): failed to open stream: No such file or directory in /www/htdocs/root/main/components/com_jreviews/jreviews/admin_controllers/fields_controller.php on line 237

what did i wrong?

Share this post

Link to post

If I am not mistaken, the original issue was only with the $ref path not being able to load from overrides, not with the JSON file which you can put in overrides, but you should probably change the name so you can differentiate it from the original file. So if you are not changing the PHP file you don't need to change anything. 

Share this post

Link to post

sorry i do not understand why i should rename this file - to make a override both files must have the same name??

the thing is fundamental, i have changed this files because for language translations:


so, that i'm save when it comes to updates i want to override this file in this folder:


and here i run in the problem, since i have copied this i got errors in the backend.

the thing is, i forgot this file to save last time before i made one of the latest updates and guess what - i lost my translations - not cool.

Share this post

Link to post

Then don't rename it, but inside the file you need to change the first key "name" so you can differentiate the original from your override. Feel free to open a ticket with access and the name of the custom field if you want me to check this on your site.

Share this post

Link to post

It already has a class of jrBusiness-open or jrBusiness-closed . You are not able to use those?


I see now that you want to add something to the

  • tag.  You can modify the theme file in the defalt theme folder: /fields_phpformat/business_hours_schedule.thtml
  • Edited by Alejandro
    Correction to answer

    Share this post

    Link to post

    This was fixed as of v3.0.24 according to the changelogs, correct? Just asking being I don't see the error on the latest versions of JReviews. No biggie, if I get the same error will place files in the core as before.

    Share this post

    Link to post

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now


    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.