[Solved]Need advice on how to replace some smarty tags

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

[Solved]Need advice on how to replace some smarty tags

Post by jasnick »

Upgraded to 1.10. In Admin:

Warning: Invalid argument supplied for foreach() in /home/...../public_html/admin/header.php on line 70
foreach( $gCms->modules as $modulename => $ext )


In upgrade instructions:
3: Removed the $gCms→modules array. use cms_utils::get_module() instead.
How exactly does this get replaced? I tried a Find and Replace using $gCms->modules and cms_utils::get_module exactly as written but it said string not found. Do these need to be enclosed in any way? So then I used the whole line making it
foreach( cms_utils::get_module() as $modulename =>$ext )

This lead to another error coming up in class.cms_utils.php

final public static function & get_module($name,$version = '')
{
return cmsms()->GetModuleInstance($name,$version);
}


Where does it end? What do I do here? Not so easy to upgrade if one doesn't know php.

I have also to do some changes to the footer menu along the same lines but will wait until I know the correct way to do this.

Thanks
Last edited by jasnick on Sat Oct 29, 2011 12:59 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Need advice on how to replace some smarty tags

Post by Dr.CSS »

That is most likely an error from a module, if you aren't using a custom admin theme, check that all your modules are up to date...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Need advice on how to replace some smarty tags

Post by calguy1000 »

line 70 if admin/header.php is:

Code: Select all

debug_buffer('before notifications');
Which tells me you had a problem with uploading files. Because that is from an earlier version (not gonna bother to find which).

Re-upload your files, re-run the upgrade routine AND do a system verification.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Need advice on how to replace some smarty tags

Post by jasnick »

Yes, Dr.CSS - it is the Modules that are giving me the problems.

Calguy - Yes, I did originally stuff up the upgrade by not upgrading individual modules first - THAT will never happen again! I reverted to the previous installation 1.9.4.3 but somehow the Module Manager was never the same again! I restored some stuff via cpanel but it is not right yet.

Will start completely over and follow your instructions above. My fault for not doing it correctly in the first instance.

Thanks for the help.
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Need advice on how to replace some smarty tags

Post by jasnick »

I've restored my problem site to 1.9.4.3 and restored the general backup so things are back to normal. Will proceed very slowly.

Thanks!
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: Need advice on how to replace some smarty tags

Post by carasmo »

I would duplicate the site and only upgrade the duplicated site. With cpanel, which I insist upon not being a programmer, I back up the database with the backup wizard, create a new database, open up phpmyadmin, uload up the old database into the new database, change the config file in the copied site (located in a subdomain, so I dont' need to deal with .htaccess). Then I have a complete copy of the site. The original is untouched. The database is copied and all the files are copied, this takes about 5 min or less with cpanel, filemanager, phpmyadmin. Then I upgrade the copy. Done this for years, my hair is less gray. Once that is smoothed out, then I still keep a copy of the old site in another subdomain with the old database, and move the main one to the root, and change the config.php to work from the root.
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Need advice on how to replace some smarty tags

Post by jasnick »

Thanks carasmo, that seems a good way to go! I'm not a programmer either so have to rely on everything working as it should!
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: Need advice on how to replace some smarty tags

Post by carasmo »

Then immediately when you go to the copied site, change the sitename to the COPY with something that will get your attention, that way you don't mess up and start pasting in new code and fixes into the pristine old backup. I did this yesterday, fortunately, each template I make I make a text file of it and then I had it.
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Need advice on how to replace some smarty tags

Post by jasnick »

Yes! - I have to really think what I am doing all the time.
Locked

Return to “[locked] Installation, Setup and Upgrade”