Stylesheets not loading after moving to a .com domain

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

Postby generatedname » Tue Jun 05, 2007 8:29 am

Site is in the same location, I just added a .com domain that points to the site folder (not the dataface folder). Site still loads and functions without any syntax errors, it just does not use the stylesheet and looks like crap.

I made sure that the main template references {$ENV.DATAFACE_URL}, and that index.php uses a relative path as well.

Anyone else dealt with this problem before?

Thanks.
generatedname
 
Posts: 53
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Jun 05, 2007 9:36 am

Hi Kurtis,

The place to look is in your application's index.php file, specifically at the 2nd parameter of the df_init() function call.
e.g. df_init(__FILE__, '/path.to.dataface');
The /path.to.dataface must be a web accessible url to the dataface directory.Ê If you leave it relative, then it must be accessible from the current domain.Ê For best results dataface should be accessible through the same domain as the site or you may run into javascript problems with FCKEditor.
Best regards
Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby generatedname » Tue Jun 05, 2007 10:04 am

So what you are saying is that the domain needs to point to the directory that is higher than the dataface and my site directories?

The call to df_init is:

df_init(__FILE__, '../dataface');
generatedname
 
Posts: 53
Joined: Wed Dec 31, 1969 5:00 pm

Postby generatedname » Tue Jun 05, 2007 10:12 am

Would it be a good idea to put the dataface folder inside my site's folder and access it with

df_init(__FILE__, '/dataface');


?
generatedname
 
Posts: 53
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Jun 05, 2007 10:18 am

I generally like to keep dataface separate from your site's folder to make it easier to upgrade (treat dataface like a library).

It is worth mentioning, though, that if you did put dataface inside your site's folder, the df_init() method would look like:

df_init(__FILE__, 'dataface');

and not

df_init(__FILE__, '/dataface');

(Note the lack of a leading slash).

If you used:

df_init(__FILE__, '/dataface');

Then this would point to a dataface directory at the root of the host.

e.g. If your site was located at:

http://yourdomain.com/path.to/mysite

then dataface would be located at

http://yourdomain.com/dataface

-Steve

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby generatedname » Tue Jun 05, 2007 10:32 am

Thanks for your help, I'm going to play around with this for a bit.

Is there anywhere else that I need to define the location of the dataface folder? Or is it just in the index.php file? I don't want everthing to mess up by moving a folder =)
generatedname
 
Posts: 53
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Jun 05, 2007 10:34 am

The only place where this needs to be set is in the index.php file.

Happy hunting.

(Also note that you could use an absolute url to point to the dataface folder).

e.g.

df_init(__FILE__, 'http://yourdomain.com/path.to/dataface');


--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 28 guests

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