Hi all,
I've just updated to the latest version using the update script and all seems to be working fine except I get these 3 errors within the web UI.
Warning: Invalid argument supplied for foreach() in /web/index.php on line 76
Warning: Invalid argument supplied for foreach() in /web/admin.php on line 425
Warning: Invalid argument supplied for foreach() in /web/inc/header.inc.php on line 106
Does anyone else have this problem or know how I can fix them?
Thanks very much.
Jamie.
I have the first error as well: #760
I just found out, that all your lines have to do with app_links.
Something seems to be broken there: https://github.com/mailcow/mailcow-dockerized/search?utf8=%E2%9C%93&q=app_links&type=
@andryyy Did anything change regarding app_links?
@andryyy For my very first instance of mailcow I still have the problem with header.inc.php on line 119, for example when I open the dropdown "Apps". I did a git pull but it didn't help. Any ideas?
No, the code is not up to date then. Why do you see PHP warnings there anyway? Seems like they were enabled in vars inc.
Shouldn't git pull remove such atrocities like enabled php warnings? 馃槢
Is there a way to git pull force only the data web folder or something to fix that? ^^
You can try git checkout data/web
edit: autocorrect :-(
I checked my guts 馃槤 and also checked out data/web:

Did a CTRL+F5 as well. EDIT: And naturally did a docker-compose restart.
Nopeynope :<
@Braintelligence just out of curiosity are you using a custom theme for mailcow? And is it opensource? :D
Why are PHP warnings enabled? You enabled them in vars inc php or vars local inc.
@andryyy I don't remember enabling anything on purpose. Also if I git pull, shouldn't it overwrite anything I might have set? Or are we talking about a file somewhere else than data/web?
@ntimo I don't think I've touched anything theme-related other than SOGo. All my instances look the same for Mailcow UI.
No, vars local inc php would not be reset. You can remove that file.
@Braintelligence This isnt the default theme... you should write down your changes. :-)
Ok, so the theme comes from the vars.local.inc file. And I'm using the bootswatch theme flatly in there. No need to turn all copylefty on me now, you guys 鈽癸笍. I didn't change anything.
I have no idea where this file came from but I do remember seeing the bootswatch thing a long long time ago and playing around with it.
EDIT: After removing the PHP error detail setting I'm not seeing the warning anymore. 馃憤
@ntimo You can find the setting for the theme here: https://github.com/mailcow/mailcow-dockerized/blob/4227ec15fc07a16b01fa51c60f29059552f31fc1/data/web/inc/vars.inc.php#L86
EDIT: For clarification: Create a vars.local.inc.php to override settings there. The link was just for your reference so you know which variable to tackle.
I didn't change anything.
But you did.
Do not use vars.inc.php but vars.local.inc.php for persistent changes. :-)
Themes are part of the docs, but remember that anything other than "lumen" loads external resources.
I didn't mean you changed my local or the repo code, but I also didn't change anything globally on the code. I never changed anything within vars.inc.php, see my comment https://github.com/mailcow/mailcow-dockerized/issues/693#issuecomment-424689068
EDIT4: This also should have been pretty clear from the start, because I checked out data/web which should have erased the vars.inc.php and anything I might have put there...
It seems I created a vars.local.inc.php as it is described in the comments of vars.inc.php, but I just can't remember when and why. I just remember playing around with the bootswatch themes which resulted in the preference of flatly. I don't know how the PHP error setting came about; I guess I was playing around with it to find out what was wrong with https://github.com/mailcow/mailcow-dockerized/issues/693 and others.
If you want me to fork this repo to provide my vars.local.inc.php with one changed line, then I'll gladly do it 馃ぃ @andryyy Please advise me to do so, if necessary.
EDIT: Thx for the hint about external resources. I double-checked for some of my instances if anything other than lumen was used.
EDIT2: I actually can't find anything about the bootswatch themes in the mailcow docs. Should we mention them and also mention the security implications concerning external resources? EDIT3: Even though the implication is mentioned in the vars.inc.php.
@andryyy I think I know where the setting came from. I think I wanted to play around with bootswatch themes and copied the vars.inc.php to a vars.local.inc.php to overwrite the settings I needed. I was too lazy to set them in an atomic way =/.
Since the vars.inc.php included the warning error report in the past:
https://github.com/mailcow/mailcow-dockerized/blob/bfd0857b3ea0f3a13ea1411a5d6a8155fa9a2b7f/data/web/inc/vars.inc.php
I also copied that setting.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.