FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Warning: Invalid argument supplied for foreach (RESOLVED) (when attempting to edit newly installed themes)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Warning: Invalid argument supplied for foreach (RESOLVED) [message #159865] Wed, 01 July 2009 03:11 Go to next message
The Witcher is currently offline  The Witcher   United States
Messages: 662
Registered: May 2009
Location: USA
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
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!


index.php?t=getfile&id=5664&private=0


"I'm a Witcher, I solve human problems; not always using a sword!"

[Updated on: Fri, 03 July 2009 12:18]

Report message to a moderator

Re: Warning: Invalid argument supplied for foreach [message #159876 is a reply to message #159865] Thu, 02 July 2009 12:27 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3681
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
I've quickly tried, but cannot reproduce the problem. What should I do to get the error?
icon6.gif  Re: Warning: Invalid argument supplied for foreach [message #159877 is a reply to message #159876] Thu, 02 July 2009 16:00 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 662
Registered: May 2009
Location: USA
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
I don't rightly know off hand, I installed multiple themes when I noticed it
And since I do not understand what the error refers to I am a bit stuck as far as trouble shooting, what I do know is that it does not occur on every theme installed.

I will uninstall them and repeat the installation step by step




"I'm a Witcher, I solve human problems; not always using a sword!"
icon6.gif  Re: Warning: Invalid argument supplied for foreach [message #159878 is a reply to message #159876] Thu, 02 July 2009 17:46 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 662
Registered: May 2009
Location: USA
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
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 #159881 is a reply to message #159878] Fri, 03 July 2009 03:06 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 662
Registered: May 2009
Location: USA
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
I have reinstalled themes anew same issue:

Tried new installation same o same o,

Buttons seem to make no difference,

Have e-mailed frank login info for test forum accesses:



"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Warning: Invalid argument supplied for foreach [message #159882 is a reply to message #159881] Fri, 03 July 2009 09:36 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3681
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Here is a fix: http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=11949
icon6.gif  Re: Warning: Invalid argument supplied for foreach [message #159883 is a reply to message #159882] Fri, 03 July 2009 12:18 Go to previous message
The Witcher is currently offline  The Witcher   United States
Messages: 662
Registered: May 2009
Location: USA
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
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!"
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Umlaut issue with 2.7.7 on Fedora 8 with UTF-8 (resolved)
Next Topic: collapse and expand buttons no longer available after restoring data dump!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Oct 16 00:03:19 EDT 2018

Total time taken to generate the page: 0.00892 seconds