Page 1 of 1

[SOLVED] Fatal Error- class.usertagoperations.inc.php

Posted: Wed Sep 23, 2015 7:20 pm
by pjb
After upgrading from CMSMS 1.12.1 to ver 2.0, I'm getting this error when trying to view th website:

Fatal error: Call to a member function GetSmarty() on a non-object in /home/githensc/public_html/workshop/lib/classes/class.usertagoperations.inc.php(278) : eval()'d code on line 148

I am able to log on to the admin page.

Here's the system info:

----------------------------------------------

Cms Version: 2.0

Installed Modules:

CMSMailer: 5.2.4
FileManager: 1.5
MenuManager: 1.50
ModuleManager: 2.0
News: 2.50
Printing: 1.1.1
Search: 1.50
ThemeManager: 1.1.8
TinyMCE: 2.9.12
FormBuilder: 0.8.1.1
Captcha: 0.5.2
FormBrowser: 0.4.2
AdminSearch: 1.0
MicroTiny: 2.0
CGExtensions: 1.49.7
JQueryTools: 1.3.7
CMSContentManager: 1.0
CMSFoundation: 1.5.1
CGSmartImage: 1.20.3
DesignManager: 1.0
Navigator: 1.0


Config Information:

php_memory_limit:
max_upload_size: 2000000
url_rewriting: none
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: America/Chicago
permissive_smarty: false


Php Information:

phpversion: 5.4.45
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference:
test_db_timedifference:
memory_limit: 128M
max_execution_time: 30
output_buffering: 0
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: Off (False)

Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.5.40
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No file system time difference found


----------------------------------------------

Re: Fatal Error- class.usertagoperations.inc.php

Posted: Wed Sep 23, 2015 7:24 pm
by Rolf
Check (or post) your UDTs, somthing is wrong there...

Re: Fatal Error- class.usertagoperations.inc.php

Posted: Wed Sep 23, 2015 8:05 pm
by pjb
I have four UDTs in the setup. Three (custom_copyright, print, and user-agent) seem very straightforward.

The fourth one is labelled "mobile" -- and I believe it is part of the Foundation 5 framework used by the site's template. I bet the problem is in here, but I don't know how to spot it. I've attached a file with the "mobile" UDT code.

Thanks for your help.

Re: Fatal Error- class.usertagoperations.inc.php

Posted: Wed Sep 23, 2015 8:11 pm
by Jo Morg
On that UDT search for

Code: Select all

global $gCms;$smarty = &$gCms->GetSmarty();
and remove it...
It should have started giving you problems before, but now it just breaks... and it's not needed...

Re: Fatal Error- class.usertagoperations.inc.php

Posted: Thu Sep 24, 2015 5:58 pm
by pjb
OK. Removing
global $gCms;$smarty = &$gCms->GetSmarty();

does make the error go away. Thanks for spotting that -- I never would have!

Now, however, main content does not display on the page, I suspect because the "mobile" UDT isn't returning what the page template is looking for.

I've attached a file that contains the page template is question.

I understand we're getting away from core CMSMS issues here. Perhaps my best option would be to revert to CMSMS 1.12.1.

Again, thanks for thinking about this.

Re: Fatal Error- class.usertagoperations.inc.php

Posted: Thu Sep 24, 2015 6:04 pm
by calguy1000
You are now experiencing smarty scope issues. Which is a new concept announced prior to release, introduced in CMSMS 2.0 and discussed in the documentation.