Warning: Invalid argument supplied for foreach (RESOLVED) [message #159865] |
Wed, 01 July 2009 07:11 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
Installed 6 themes on 2 forums for testing, look and run fine apparently however when going to edit the templates I receive this error:
Warning: Invalid argument supplied for foreach() in /home/.server/FTP_user/Domain.name/adm/tmpllist.php on line 283
Warning: Invalid argument supplied for foreach() in /home/.server/FTP_user/Domain.name/adm/tmpllist.php on line 293
This error reoccurs across the board with 5 of 6 themes installed,
I will begin uninstalling them tomorrow off 1 forum and reinstall step by step!
"I'm a Witcher, I solve human problems; not always using a sword!"
[Updated on: Fri, 03 July 2009 16:18] Report message to a moderator
|
|
|
|
|
Re: Warning: Invalid argument supplied for foreach [message #159878 is a reply to message #159876] |
Thu, 02 July 2009 21:46 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
OK I have reproduced the error. This is what I have done so far step by step.
Uninstall questionable themes:
1. Opened FTP and download questionable themes to file "Problem childs" from FUDforum/thm/Theme_names as a save folder to reproduce problem if needed.
Beaujolais_default Contains 1 tmpl, and 2 images
forestgreen_default 8 templs, 18 images
penguin_default 3templs, 83 images
dark_default 1 tmpl, 29 images
concord_default 3tmpls, 18 images
black_default 3tmpls, 122 images
2. Forum>admincp>thememgr DELETE
Beaujolais_default
penguin_default
dark_default
black_default
concord_default
forestgreen_default
Rebuild all themes!
3. open FTP and delete FUDforum/thm/
Beaujolais_default
penguin_default
dark_default
black_default
concord_default
forestgreen_default
close FTP
4. Open forum, clear cache, rebuild themes (all gone), compact messages, consistency check....0 error msgs, All ok logout, close.
DONE WITH UNINSTALL
REINSTALL THEMES:
1. open FTP, FUDforum/thm upload themes from theme archive files (unzipped),
Using original theme files
Beaujolais_default
penguin_default
dark_default
black_default
concord_default
forestgreen_default
Close FTP
2. open forum, Forum>admincp>thememgr
(all 6 listed in theme mgr as template sets)
add: as enabled
Beaujolais_default
penguin_default
dark_default
black_default
concord_default
forestgreen_default
Rebuild all themes
Rebuilding theme default (english)...
Rebuilding theme Beaujolais_default (english)...
Rebuilding theme penguin_default (english)...
Rebuilding theme dark_default (english)...
Rebuilding theme black_default (english)...
Rebuilding theme concord_default (english)...
Rebuilding theme forestgreen_default (english)...
>Template editor> ERROR REPRODUCED!
Only forestgreen_default is unaffected
3. installed northernlights, same way, when attempting to create theme get this error:
Undefined template: "postcheck_no_links_allowed" inside "register.php.t"
(this is one I know) Delete>register.tmpl from theme (also deleted from archive, which I should have done the 1st time)
Create theme northernlights rebuild all themes.
Rebuilding theme default (english)...
Rebuilding theme Beaujolais_default (english)...
Rebuilding theme penguin_default (english)...
Rebuilding theme dark_default (english)...
Rebuilding theme black_default (english)...
Rebuilding theme concord_default (english)...
Rebuilding theme forestgreen_default (english)...
Rebuilding theme northernlights (english)...
>template editor northernlights....OK!
My next step will be to uninstall just those that get an error, then reinstall them one at a time and check again.
Possible cause from my view is that dark, penguin, and black were all built on previous versions of FUD, but that does not explain concord or Beaujolais!
I believe my installation procedure was correct, and I don't believe any changes were made to themes otherwise except for adding some of the new buttons I have been working on, but I presume that would affect northern lights and forest green as well since they use the same button sets.
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|
|
|
Re: Warning: Invalid argument supplied for foreach [message #159883 is a reply to message #159882] |
Fri, 03 July 2009 16:18 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
Ok I think I can manage that ok, but why was the error there?
I know it says "Fix PHP warning when editing sparse themes" and looking at the themes files on my hard drive and comparing them shows that "forestgreen and northernlights" have more tmpl files included than the others do (6 as Opposed to 1or2).
So am I to understand that the program was looking for additional tmpl files in the others themes as well?
I have added more tmpl files to the other themes so they all have the same tmpl files and that also resolves the error, so I am assuming that it was the difference in the number of tmpls the error referred to as opposed to the lack of any particular one.
That would explain why I did not get an error when I first installed the themes because originally I was only including the css tmpl in the themes and only added header, footer, coppa, etc later (but did not add them to all the themes).
At any rate Problem RESOLVED
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|