I have added code to the Head part of the additional html page. Now my site doesn't show. How can I remove the code.
I am using Moodle 3.6.4 with Essentials theme.
Nolan
Essential theme settings are found in
mdl_config_plugins
select * from mdl_config_plugins where plugin = 'theme_essential'
query above shows 1025 rows.
from command line:
mysql -u USER -p'PASSWORD' -e "use DATABASE4MOODLE;select * from mdl_config_plugins where plugin = 'theme_essential';" > ./essentsettings.txt;cat ./essentsettings.txt;wc -l essentsettings.txt
Look at the resulting essentsettings.txt file
In the site I was using to check info (can't share here cause it
has too much info tha needs to remain private, and for me, too much info period (am a function over form kinda guy) the text file had this which looks like the area you might have edited in settings to cause 'white screen of death'. Your row 1147 might be different ...
1147 theme_essential customcss .dimmed,
\na.dimmed:link,
\na.dimmed:visited,
\na.dimmed_text,
\na.dimmed_text:link,
\na.dimmed_text:visited,
\na.dimmed_.categoryname,
\n.dimmed_text,
\n.dimmed_text a,
\n.dimmed_text a:link,
\n.dimmed_text a:visited,
\n.dimmed_text a{
\nfont-style: normal;
\ncolor: #999;
\n}
\n.usersuspended,
\n.usersuspended a,
\n.usersuspended a:link,
\n.usersuspended a:visited,
\n.dimmed_category,
\n.dimmed_category a {
\ncolor: #ececec;
\n}
\n.dimmed_text a {
\ncolor: #ececec;
\n}
\n/*.categoryname a:visited{
\n
\n*/
\n
\n
\n/*
\n
\nHide Top page block - This is good to go
\n
\n*/
\n.categorypicker {
\ndisplay: none;
\n}
\n#coursesearch {
\ndisplay: none;
\n}
\n.box generalbox info{
\ndisplay: none;
\n}
\n
\n.dimmed_category .info .categoryname a:visited{
\nfont-style: normal;
\ncolor: #ececec;
\n}
\n
Above is guess (probably wrong for your site).
Note and 2 cent advice: as I understand it, support for Essential theme is going away in higher versions of Moodle. Might consider finding another theme now rather then get dependent on something you might not be able to fix in higher versions ... you can't stay at your version of Moodle for ever and ever ... you'll have to upgrade - sooner or later.
Good luck ...
'SoS', Ken
Notwithstanding Ken’s comments about the Essential theme being deprecated, the Additional HTML settings are not tied to any one theme. Look in the mdl_config table and search the 'name' field for "additionalhtmlhead" - what you entered (or at least, what remains of what you entered) will be in the 'value' field 😊
Ahhh ... What Jon said! He is 100% correct!
That's what I get for responding to what seemed a plea in an un-solicited PM in an area (themes) where I claim I'd prefer not to mess with being a function over form kinda guy!
'SoS', Ken
Yes. Be VERY VERY careful editing anything directly in the database - but if your site is not accessible, you don't have much choice.
I've just looked at your site, and the page is definitely loading with content, but there appears to be nothing within the <body> tags. All of your content is sitting in the head tag, so I think you have a missing tag somewhere.
Hi Jon,
From the page source it looks like there are more than one set of body tags!
here is one right at the end of the code.
Got command line?
Possible work-around to get site back if it was errant additional HTML - a character that doesn't show?
in moodlecode/admin/cli there is a cfg.php script that shows all settings.
php cfg.php |grep additional
begets 3 variables
additionalhtmlhead
additionalhtmltopofbody
additionalhtmlfooter
In config.php file of site one could add:
$CFG-> additionalhtmlhead="";
$CFG-> additionalhtmltopofbody="";
$CFG-> additionalhtmlfooter="";
'SoS', Ken
After $CFG->admin = ''; is a good place.
Am confused however, you say you are running php 7.1 - you mean you are now ... when last checked it was 7.3.
I can see your site ... no white screen of death for me?????
'SoS', Ken
Welcome. BTW, as long as those lines are in config.php you will NOT be able to edit/add to those areas in the admin. As far as those lines being responsible for fix ... maybe a factor ... maybe some task/cron kicked in to refresh cached theme info, etc.
Is it possible that someone else could see and you couldn't ... yes, cookies, caches ... browser caches as well as server caches and sessions. Admin users are sometimes more afflicted than students/guest/others. Comes with the territory of being an admin.
Anyhooo ... all is well that ends well, right?
'SoS', Ken
Also ... is your version of PHP too high?
Server: Apache
X-Powered-By: PHP/7.3.5
https://docs.moodle.org/dev/Moodle_3.6_release_notes
PHP version: minimum PHP 7.0.0 Note: minimum PHP version has increased since Moodle 3.3. PHP 7.1.x and 7.2.x are supported too. PHP 7.3.x support is being implemented (@ MDL-63420) and not ready for production with this release.
https://tracker.moodle.org/browse/MDL-63420
'SoS', Ken
And when you do what Jon is suggesting make note in a text file (copy from field in DB to a text file) what it was you removed and share that info back here.
Am curious as to what caused it!
'SoS', Ken