Warning image missing for Archived Content message if /wet-boew/dist folder is not in root of website or has a different name
Closed this issue · 6 comments
SUMMARY
The image source link to /wet-boew/dist/js/images/archived/warning.gif (little yellow triangle with an exclamation mark in it) in wet-boew/dist-php/config\config-eng.php and config-fra.php doesn't work if wet-boew/dist is installed in a subdirectory of the webserver. The source path in the current code assumes it is installed in the root.
ENVIRONMENT
- Latest version of WET-BOEW-PHP downloaded on 2013-11-21.
- WET-BOEW 3.1.6.
REPRODUCING THE ISSUE
The issue can be reproduced if the /wet-boew/dist/... folder is not be located in the root of the webserver, or if the wet-boew or dist folders have different names.
DEMONSTRATION OF THE ISSUE
SOLUTION
In each of the following files:
/wet-boew/dist-php/config/config-eng.php
/wet-boew/dist-php/config/config-fra.php
Change the img src in the following line. It is the next to last line in the file which starts with:
$SITE['archived'.$LANG] = "
<img src='/wet-boew/dist/js/images/archived/warning.gif'
Replace it with:
$SITE['archived'.$LANG] = "
<img src='".$_SITE['wb_core_dist_folder']."/js/images/archived/warning.gif'
NOTES
- The above code is only a small part of the complete line.
- I noticed that this line are also missing in existing language config files other than French and English.
Let me know if you have any questions.
Best regards,
Michael Milette
Hi @upsonp ,
I put in a pull request to address this issue. See:
https://github.com/michael-milette/wet-boew-php/pull/1
Best regards,
Michael
Not sure what went wrong but I seem to have sent myself the pull request instead of to the original source. See:
Thanks Michael,
I have to parse out that complex line and put the HTML code in the head-nav.php file and put the text and links as separate variables in the proper config files; looking at it now I was obviously being lazy. I'll try to find some time to clean it up when I get home tonight. I just put a clean install of Ubuntu on my home PC so I have to get my LAMP stack set back up before I can do any development.
Thanks for doing the pull request and fixing the issue.
One more small change. Can you insert the following line (around line 18) to the /dist-php/config/config.php file please?
$_SITE['archived_'.$_LANG_] = (!isset($_SITE['archived_'.$_LANG_]) ? 0 : $_SITE['archived_'.$_LANG_]);
It will prevent the demo from displaying a warning about the variable not being set.
Thanks.
Michael
Ok, I've expanded the archived banner section in the config-[lang].php files, moved the HTML code to the head-nav.php file, created an archive demo page and added the code to the top of the config.php file.
$_SITE['archived_'.$_LANG_] = (!isset($_SITE['archived_'.$_LANG_]) ? 0 : $_SITE['archived_'.$_LANG_]);
Busy night.