Closed RoukePouw closed 4 years ago
When you get the blank screen, is there any error in your webserver error log?
Not sure, I'll check.
But I think this is the culprit
case 'system/languages/languages.json': return file_get_contents('system/languages/languages.json');
edit:
[07-May-2020 09:07:28 UTC] PHP Warning: file_get_contents(system/languages/languages.json): failed to open stream: No such file or directory in ../hypha2/hypha.php on line 421
[07-May-2020 09:07:28 UTC] PHP Warning: Invalid argument supplied for foreach() in /Users/Rouke/Documents/Mijn projecten/hypha2/hypha.php on line 298
[07-May-2020 09:07:40 UTC] PHP Warning: require_once(system/core/crypto.php): failed to open stream: No such file or directory in ../hypha2/hypha.php on line 216
[07-May-2020 09:07:40 UTC] PHP Fatal error: require_once(): Failed opening required 'system/core/crypto.php' (include_path='.:/Applications/MAMP/bin/php/php7.2.10/lib/php') in ../hypha2/hypha.php on line 216
My current understanding:
Advanced : run from git repo
Basic : run from downloaded hypha.php
Problem : because 'system/languages/languages.json' is not available
Possible solution 1: add hardcoded fallback value
Possible solution 1b: utilize some form of metadev (build script?) to add hardcoded values automaticcaly into the file
Possible solution 1: add hardcoded fallback value
I think this is what we had originally when running from git (en only), and tried to fix in #252.
Possible solution 1b: utilize some form of metadev (build script?) to add hardcoded values automaticcaly into the file
This is exactly what the hypha.php building already should do. When you download a hypha.php file, it will have the contents of all other php files embedded. The idea is that the contents of the data()
function is replaced by a a switch with all the contents of these files, including the languages.json file. So this line:
case 'system/languages/languages.json': return file_get_contents('system/languages/languages.json');
Is just a place holder when running from git directly, in a downloaded hypha.php, that line should have been replaced by file contents for all relevant files.
However, it sounds like that entire thing is broken, if that line is still present in your generated hypha.php?
Turns out it was some bad regex. I think in this context ^
searches from start of entire string, not start of line
Looks like it was either an error on my end or a fluke. (Reference: https://github.com/PlanBCode/hypha/pull/307 )
Closing this
when creating a hypha.php to download the subsequent form has an empty language dropdown. On send a blank screen is shown and the install did not succeed