Object expected error

A place for users and developers of the Xataface to discuss and receive support.

Object expected error

Postby quakefiend420 » Thu May 13, 2010 12:03 pm

I went through and set things up manually, not using the script...followed the instructions in the "getting started" section...it pulls info from my database, however all that loads is text and i get an "object expected at line 38" error. I tried to bold line 38, but that doesn't work, heh.

</head>
<body onload="bodyOnload()" />

I'm not a javascript or a php expert by any means, can anyone give me an idea of what's going on here?

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
               
         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
      <title>fieldtechs - Dataface Application</title>
      <link rel="stylesheet" type="text/css" href="http://path/to/dataface/plone.css"/>      <!-- Stylesheets go here -->      
            <!-- Common Plone ECMAScripts -->
   
      <!-- Pull-down ECMAScript menu, only active if logged in -->
      
      <script type="text/javascript"
            src="http://http://path/to/dataface/plone_menu.js">
      </script>
   
      <!-- Define dynamic server-side variables for javascripts in this one  -->
      <script type="text/javascript"
            src="http://http://path/to/dataface/plone_javascript_variables.js.php">
      </script>
      <script type="text/javascript" language="javascript"><!--
      DATAFACE_URL = 'http://path/to/dataface';
      DATAFACE_SITE_URL = 'http://path/to/dataface/my_table';
      DATAFACE_SITE_HREF = '/http://path/to/dataface/my_table/index.php';
      DATAFACE_PATH = 'D:/published files/http://path/to/dataface';
      //--></script>
   
      <script type="text/javascript"
            src="http://http://path/to/dataface/plone_javascripts.js">
      </script>
            
                              <!-- custom javascripts can go in slot "custom_javascripts" -->
            
            <!-- Place any other items in the head of the document by filling the "head_slot" slot -->
                  
   

   </head>
   <body onload="bodyOnload()" />

      <link rel="alternate" href="http://http://path/to/dataface/amy_table/index.php?-table=fieldtechs&-action=feed&-cursor=0&-skip=0&-limit=30&-mode=list"
          title="RSS 1.0" type="application/rss+xml" />


This is the section that's giving me trouble:
</head>
<body onload="bodyOnload()" />
I get a javascript error, object expected, and it points me here.

Thanks in advance!
quakefiend420
 
Posts: 3
Joined: Thu May 13, 2010 11:56 am

Re: Object expected error

Postby shannah » Thu May 13, 2010 12:06 pm

Please post:
1. *Full* error message you're receiving.
2. Your conf.ini file and index.php file.
3. Version of PHP/MySQL/Xataface you are using.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Object expected error

Postby quakefiend420 » Thu May 13, 2010 2:41 pm

PHP Version: 5.2.8
Webserver: Apache 2.2.11
MySQL: 5.1.30
Xataface: 1.2.2 and 1.2.3b2 both exhibit the same behavior.

The object expected error is what i see when i use IE's built in debugger.

conf.ini
Code: Select all
[_database]
host = "localhost"
user = "username"
password = "password"
name = "database name"

[_tables]
mytable = "mytable"


index.php
Code: Select all
<?php
require_once 'D:\path\to\xataface root\dataface-public-api.php';
df_init(__FILE__, 'http://host/path/to/xataface root');
$app =& Dataface_Application::getInstance();
$app->display();
?>


Here is the error i'm seeing in the debugger:

Image

Here is a view from the browser:

Image

Does that help? Let me know if you need anything else.
quakefiend420
 
Posts: 3
Joined: Thu May 13, 2010 11:56 am

Re: Object expected error

Postby shannah » Thu May 13, 2010 2:49 pm

Yes. That helps. Your problem is this line:
Code: Select all
df_init(__FILE__, 'http://host/path/to/xataface root');


in your index.php file. The 2nd parameter should be the URL to your xataface folder. This doesn't look correct. It can be a relative URL or an absolute URL.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Object expected error

Postby quakefiend420 » Thu May 13, 2010 3:35 pm

shannah wrote:Yes. That helps. Your problem is this line:
Code: Select all
df_init(__FILE__, 'http://host/path/to/xataface root');


in your index.php file. The 2nd parameter should be the URL to your xataface folder. This doesn't look correct. It can be a relative URL or an absolute URL.

-Steve


You nailed it, I fumble fingered the URL :oops:

Thanks a million!
quakefiend420
 
Posts: 3
Joined: Thu May 13, 2010 11:56 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 20 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved