Object expected error
Archived from the Xataface Users forum.
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>
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>
fieldtechs - Dataface Application
<script type=”text/javascript”
src=”http://http://path/to/dataface/plone_menu.js”>
</script>
<script type=”text/javascript”
src=”http://http://path/to/dataface/plone_javascript_variables.js.php”>
</script>
<script type=”text/javascript”
src=”http://http://path/to/dataface/plone_javascripts.js”>
</script>
</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>
I get a javascript error, object expected, and it points me here.
Thanks in advance!
shannah — Thu May 13, 2010 12:06 pm
Please post:
- *Full* error message you’re receiving.
- Your conf.ini file and index.php file.
- Version of PHP/MySQL/Xataface you are using.
-Steve
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:
Here is a view from the browser:
Does that help? Let me know if you need anything else.
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
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
Thanks a million!