Webpages do not load in Rachel module
We are trying to add our existing website https://cyberrwanda.org to Rachel and are facing a couple of issues.
Here are the steps we followed.
- Copied our build folder into Rachel at /.data/RACHEL/rachel/modules
- Added an edited version of rachel-index.php file inside the build folder.
This leads to showing us a cyberrwanda module in the rachel home page.
But when we click on the module, it leads to a blank page:
We tried to debug the contents of the page and found that all the requests originating from index.html result in a 404 error.
These requests are trying to reach content with a different prefix source. (Attached Image for reference)
Ex: A sample requests looks like http://my.content/styles/font.otf .
But we believe it should look like http://192.168.88.1/modules/CyberRwanda/styles/font.otf .
Do let us know how can we go about fixing this.
Hello, I can’t see any of the links. Can you upload actual screen shots?
It seems like you may have to adjust file permissions within cyber rwanda. You can also send us the module to test here. Load it up to a Google Drive and we can take a look.
By these two links you referenced, there may be an issue with the links in your rachel-index.php.
(1) Ex: A sample requests looks like http://my.content/styles/font.otf1 .
(2) But we believe it should look like http://192.168.88.1/modules/CyberRwanda/styles/font.otf
In your rachel-index.php file, verify you have the “/” in your links: “<?php echo $dir ?>/styles/font.otf”>
Thanks for your help Jeremy and Steve. I’ve added the screenshot and copied the php file below. You can access the build files here https://we.tl/t-olv4fXon0r .
<p>Play games, learn how to get a job and have successful relationship.</p>
<a href="<?php echo $dir ?>/index.html">View CyberRwanda module
This is more @Steve’s area of expertise, but it does look like you still have path issues:
Your links should be pointed my.content/CyberRwanda/styles/futur…
I looked into the site a little further. I see the module loaded. It appears the pic under ‘cyberrwanda’ may be a different name or path than what is called in your rachel-index.php script.
Going back to your previous post. You reference a blank page here:
Clicking on the link does take me to the expected URL. The URL however, is blank (as you also experienced). The page element is empty. Did you use a website design or software which had online dependencies? Perhaps there is a dependency which prevents the page from loading or a format that is not supported on the unit. The pic which you provided shows .otf format for example. You may go to the device where you designed the website and disconnect internet access to see if it still works. That may be one way to differentiate the web module from the Rachel Platform in terms of where the issue resides.
Thanks for getting back so quickly with the response.
“It appears the pic under ‘cyberrwanda’ may be a different name or path than what is called in your rachel-index.php script”
Well we have specified a relative path created with php in rachel-index.php. So this might not be the problem. Given from debugging the network calls we do see it requests the correct files needed to create the index.html page.
The app was created using ReactJS.
The end result is made of HTML, CSS and JS.
.otf is one of the font files needed to render the font.
We tried to run the app without internet access in our local environment and it works as intended (Except for the API calls).
You can download the code from here : https://we.tl/t-olv4fXon0r
We will try changing the permissions of the folder/files inside the code and see if that helps.
Thanks again for all the help.
Is this what you expect from the index.html page?
There is a path issue. It looks like a slash ‘/’ is added to each of the paths in the html. By removing the slashes in the code, the path becomes relative to the current directory…
The main pic calls file CAP3.png in the current dir (no such pic): <?php echo $dir ?>/CAP3.png" alt=“cyberrwanda”. Replace the CAP3.png with path/picname.png and that should work.