Errors: Application Upgraded to Xataface latest version

38 views
Skip to first unread message

Muzafar Shah

unread,
Jul 13, 2021, 7:14:54 AMJul 13
to Xataface

Hi Steve,

Hope you are doing well,

I am trying to implement Xataface latest version downloaded from here (https://github.com/shannah/xataface) on our old version application, but I am getting the errors as mentioned in the attached screenshot. I have cleared the templates__c directory as well. I tried to disable G2 but it is not working though

Could you please help resolve the issue?

I have converted all MySQL functions to MySQLi using ant script.

PHP 7.3.29 (cli) (built: Jul  6 2021 21:58:04) ( NTS )

Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies

error-latest-version.png
page.png

Steve Hannah

unread,
Jul 13, 2021, 7:26:20 AMJul 13
to xata...@googlegroups.com
That exception should be impossible.  Something must be wrong with the installation.

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xataface+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/e587437b-058e-4b9d-ad4d-d4aa882cda9en%40googlegroups.com.


--
Steve Hannah
Web Lite Solutions Corp.

Muzafar Shah

unread,
Jul 13, 2021, 8:34:59 AMJul 13
to Xataface
What do you think can be wrong? 
I have just downloaded the latest version from Github, run Ant script to change functions from MySQL to MySQLi (xf_db), put driver=mysqli in conf.ini and nothing else changed. 

Do you think there might be an issue with the server or what? I just installed a fresh server container.

tom wible

unread,
Jul 13, 2021, 9:27:01 AMJul 13
to Xataface
i just uploaded the latest github version & set php version to 8, & got this error:

[13-Jul-2021 13:16:42 UTC] PHP Fatal error: Uncaught TypeError: error_reporting(): Argument #1 ($error_level) must be of type ?int, string given in ~/public_html/lalo_DB/index.php:5 Stack trace: #0 ~/public_html/lalo_DB/index.php(5): error_reporting() #1 {main} thrown in ~/public_html/lalo_DB/index.php on line 5 
[13-Jul-2021 13:21:04 UTC] PHP Fatal error: Uncaught TypeError: error_reporting(): Argument #1 ($error_level) must be of type ?int, string given in ~/public_html/lalo_DB/index.php:5 Stack trace: #0 ~/public_html/lalo_DB/index.php(5): error_reporting() #1 {main} thrown in ~/public_html/lalo_DB/index.php on line 5

otoh, wordpress isn't php8-ready, either;-}

Steve Hannah

unread,
Jul 13, 2021, 9:40:38 AMJul 13
to xata...@googlegroups.com
On Tue, Jul 13, 2021 at 5:35 AM Muzafar Shah <shah...@gmail.com> wrote:
What do you think can be wrong? 
I have just downloaded the latest version from Github, run Ant script to change functions from MySQL to MySQLi (xf_db), put driver=mysqli in conf.ini and nothing else changed. 

Do you think there might be an issue with the server or what? I just installed a fresh server container.

Did you run the ant script on the xataface directory? (You shouldn't).  Only run the ant script on your own legacy code that uses deprecated mysql apis.
 

Steve Hannah

unread,
Jul 13, 2021, 9:41:32 AMJul 13
to xata...@googlegroups.com
Look at your call to error_reporting() inside your index.php script.  Probably you have an issue with how you are passing the arguments there.

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xataface+u...@googlegroups.com.

tom wible

unread,
Jul 13, 2021, 10:04:57 AMJul 13
to Xataface
On Tuesday, July 13, 2021 at 9:41:32 AM UTC-4 Steve Hannah wrote:
Look at your call to error_reporting() 

yup, didn't like quotes...but got this:
Fatal error: Uncaught Error: Call to undefined function money_format() in ~/public_html/xataface10july/Dataface/Table.php:5591 
Stack trace: 
#0 ~/public_html/xataface10july/Dataface/Record.php(2706): Dataface_Table->format() 
#1 ~/public_html/xataface10july/Dataface/Record.php(2815): Dataface_Record->display() 
#2 ~/public_html/lalo_DB/templates_c/dataface/%%C1^C17^C174B680%%Dataface_View_Record.html.php(320): Dataface_Record->htmlValue() 
#3 ~/public_html/xataface10july/lib/Smarty/Smarty.class.php(1259): include('~/...') 
#4 ~/public_html/xataface10july/lib/Smarty/Smarty.class.php(1109): Smarty->fetch() 
#5 ~/public_html/xataface10july/Dataface/SkinTool.php(425): Smarty->display() 
#6 ~/public_html/xataface10july/public-api.php(635): Dataface_SkinTool->display()
#7 ~/public_html/xataface10july/actions/default.php(51): df_display()
#8 ~/public_html/xataface10july/Dataface/Application.php(3446): dataface_actions_default->handle()
#9 ~/public_html/xataface10july/Dataface/Application.php(3639): Dataface_Application->handleRequest()
#10 ~/public_html/xataface10july/Dataface/Application.php(3474): Dataface_Application->_display()
#11 ~/public_html/lalo_DB/index.php(12): Dataface_Application->display()
#12 {main} thrown in ~/public_html/xataface10july/Dataface/Table.php on line 5591Fatal error: Uncaught Error: Call to undefined function money_format() in ~/public_html/xataface10july/Dataface/Table.php:5591 Stack trace:
#0 ~/public_html/xataface10july/Dataface/Record.php(2706): Dataface_Table->format()
#1 ~/public_html/xataface10july/Dataface/Record.php(2815): Dataface_Record->display()
#2 ~/public_html/lalo_DB/templates_c/dataface/%%C1^C17^C174B680%%Dataface_View_Record.html.php(320): Dataface_Record->htmlValue()
#3 ~/public_html/xataface10july/lib/Smarty/Smarty.class.php(1259): include('~/...')
#4 ~/public_html/xataface10july/lib/Smarty/Smarty.class.php(1109): Smarty->fetch()
#5 ~/public_html/xataface10july/Dataface/SkinTool.php(425): Smarty->display()
#6 ~/public_html/xataface10july/public-api.php(635): Dataface_SkinTool->display()
#7 ~/public_html/xataface10july/actions/default.php(51): df_display()
#8 ~/public_html/xataface10july/Dataface/Application.php(3446): dataface_actions_default->handle()
#9 ~/public_html/xataface10july/Dataface/Application.php(3639): Dataface_Application->handleRequest()
#10 ~/public_html/xataface10july/Dataface/Application.php(3474): Dataface_Application->_display()
#11 ~/public_html/lalo_DB/index.php(12): Dataface_Application->display()
#12 {main} thrown in ~/public_html/xataface10july/Dataface/Table.php on line 5591

tom wible

unread,
Jul 13, 2021, 10:19:11 AMJul 13
to Xataface
ps:
Warning: Undefined array key "-relationship" in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Warning: Undefined array key "-relationship" in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Warning: Undefined array key "record_id" in ~/public_html/xataface10july/Dataface/Application.php(3808) : eval()'d code on line 1
Warning: Undefined array key "history" in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Warning: Undefined array key "-relationship" in ~/public_html/xataface10july/Dataface/Application.php(3808) : eval()'d code on line 1
Warning: Undefined array key "-relationship" in ~/public_html/xataface10july/Dataface/Application.php(3808) : eval()'d code on line 1
Warning: Undefined array key "_auth" in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Warning: Trying to access array offset on value of type null in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Warning: Undefined array key "history__id" in ~/public_html/xataface10july/Dataface/Application.php(3808) : eval()'d code on line 1
Warning: Undefined array key "_output_cache" in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Warning: Undefined array key "-relationship" in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Warning: Undefined array key "-relationship" in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Warning: Undefined array key "_auth" in ~/public_html/xataface10july/Dataface/Application.php(3933) : eval()'d code on line 1
Deprecated: Function money_format() is deprecated in ~/public_html/xataface10july/Dataface/Table.php on line 5591

Steve Hannah

unread,
Jul 13, 2021, 10:30:20 AMJul 13
to xata...@googlegroups.com
Looks like money_format is deprecated so the money_format directive is failing.  Will need to create a PHP fallback function for this.  

The rest of the warnings should be suppressed unless you are running with debug=1 in conf.ini

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xataface+u...@googlegroups.com.

Muzafar Shah

unread,
Jul 14, 2021, 7:08:11 AMJul 14
to Xataface
Nope, I didn't run the ant script on xataface directory. I have diagnosed the issue and it is due to getPreferences() function, But I really don't know why it is throwing errors here on a new version. Below is the code of getPrerferences in conf/ApplicationDelegate.php. If I remove the below function, the page works fine.

function getPreferences(){ 
    $app =& Dataface_Application::getInstance();
    $user = Dataface_AuthenticationTool::getInstance()->getLoggedInUser();
    $query =& $app->getQuery();
   
 if ( !isset($user) )return Dataface_PermissionsTool::NO_ACCESS();
     $role = $user->val('role');
     switch ($role){
       case 'Admin':
       case 'Partner':
       case 'Regular':
       case 'Con':
       case 'Staff':
       case 'FFStaff':return array('disable_ajax_record_details'=>0);
       default:return Dataface_PermissionsTool::NO_ACCESS();
     }
   }

Steve Hannah

unread,
Jul 14, 2021, 7:34:53 AMJul 14
to xata...@googlegroups.com
Why do you think the problem is in getPreferences?  What error/stack trace do you get that suggests that?

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xataface+u...@googlegroups.com.

Muzafar Shah

unread,
Jul 14, 2021, 9:09:43 AMJul 14
to Xataface
I have on error reporting as you can see in the attached screen, and it has thrown the same error of getAction()

This is strangely works when I remove getPreferences function.

issue.png
Message has been deleted

webm...@mycascadescenter.org

unread,
Jul 24, 2021, 12:35:49 PMJul 24
to Xataface
github 18jul runs on php7.4, but 8.0 still breaks on money_format
Reply all
Reply to author
Forward
0 new messages