[SOLVED] Blank 'Create New' windows

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

[SOLVED] Blank 'Create New' windows

Postby gthorne » Tue Jul 24, 2012 4:02 pm

I'm getting some sort of weird error on both of my XF installs. I'm not sure which data is needed, or when it started.

On the 'select' drop-downs, when I click 'other', I just get a blank pop-up window with no fields to fill in. This worked until recently. I'm not entirely sure what the last thing I changed was.

I have two XF installs on this server, in two different directories. One I have been coding with for about a week, and one is a new install from the tarball that I did just a few hours ago. I've made this into two separate sites, in two separate directories. In both apps, the window is blank for all select lists.

These are the only ini files that I've created on the new app:

Fields.ini:
Code: Select all
[type_id]
widget:label = "Event Type"
widget:type = "select"
vocabulary = type_list

[vendor_id]
widget:label = "Vendor"
widget:type = "select"
vocabulary = vendor_list

[assigned_to_id]
widget:label = "Assigned to"
widget:type = "select"
vocabulary = personnel_list

[state_id]
widget:label = "State"
widget:type = "select"
vocabulary = state_list

[submitted_date]
widget:type = "hidden"


Valuelists.ini
Code: Select all
[state_list]
__sql__ = "SELECT state_id, postal_abbr FROM states ORDER BY postal_abbr"

[type_list]
__sql__ = "SELECT type_id, maint_type FROM maint_types ORDER BY maint_type"

[vendor_list]
__sql__ = "SELECT vendor_id, vendor_name FROM vendors ORDER BY vendor_name"

[personnel_list]
__sql__ = "SELECT personnel_id, personnel_name FROM personnel ORDER BY personnel_name"


I don't see any errors in my error.log for either site.

Any ideas?
Last edited by gthorne on Mon Aug 06, 2012 6:20 pm, edited 1 time in total.
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby shannah » Wed Jul 25, 2012 12:08 pm

What browser are you using? Are there any javascript errors showing up?

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

Re: Blank 'Create New' windows

Postby gthorne » Wed Jul 25, 2012 2:30 pm

Same in Safari, Chrome, and Firefox on Mac. No JS errors, but two warnings in the Firebug console:

Code: Select all
- Use of getAttributeNode() is deprecated. Use getAttribute() instead.
http://isocal.zayoncc.com/index.php?-action=new&-table=iso_calendar
Line 0
- Use of attributes' specified attribute is deprecated. It always returns true.
http://isocal.zayoncc.com/index.php?-action=new&-table=iso_calendar
Line 0
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby gthorne » Mon Jul 30, 2012 7:27 am

Could I get this moved to 'Xataface Users' for more visibility?
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby shannah » Mon Jul 30, 2012 10:53 am

Try putting some intentional errors in your code and see if they show up in the error.log file. If they don't then you need to find out where the errors are being written.

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

Re: Blank 'Create New' windows

Postby gthorne » Mon Jul 30, 2012 12:18 pm

Added a call to no_such_function into the directory's index.php. Here's the error log:

Code: Select all
[Mon Jul 30 14:18:01 2012] [error] [client 10.200.6.105] PHP Fatal error:  Call to undefined function no_such_function() in /var/www/html/ncctool/index.php on line 22
[Mon Jul 30 14:18:06 2012] [error] [client 10.200.6.105] PHP Fatal error:  Call to undefined function no_such_function() in /var/www/html/ncctool/index.php on line 22


Still no errors in the log when I launch the 'create new record' window.
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby gthorne » Mon Jul 30, 2012 12:24 pm

Could you tell me how/where these fields are generated? It may be something I could track down with some debugging statements.
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby gthorne » Mon Jul 30, 2012 1:43 pm

Not sure if this helps, but when I click 'OK' on the (blank) window, I get this error in the Firebug console:

Code: Select all
data is undefined
http://ncctool.zayoncc.com/index.php?-action=new&-table=device_info
Line 549


Here's the offending line:

Code: Select all
var key = data[keyfld];
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby shannah » Mon Jul 30, 2012 2:00 pm

I must misunderstand what you mean by "blank window". There was an "OK" button in the blank window? Was there anything else?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Blank 'Create New' windows

Postby gthorne » Mon Jul 30, 2012 2:22 pm

It has the standard title bar, and OK button. Here's a screenshot.

screenshot.jpg
screenshot.jpg (21.84 KiB) Viewed 16700 times
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby shannah » Mon Jul 30, 2012 2:50 pm

Does it work if you access the new record form of the states table directly?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Blank 'Create New' windows

Postby gthorne » Mon Jul 30, 2012 2:57 pm

Yes. I had the 'states' tab hidden by commenting it out in the conf.ini (I don't expect my users to add new states that often), but I re-enabled it. I'm able to add a state in the 'states' tab, but the 'Other..' window still doesn't work in for the dropdowns in the other tables.

The 'states' is just one example of this. None of the 'Other..' options are working for any table on either application. Different XF installs, different directories, same server.
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby gthorne » Wed Aug 01, 2012 1:28 pm

Just to keep this moving, here's the relevant entries from fields.ini:

Code: Select all
[state_id]
widget:label="State"
widget:type = select
vocabulary = state_list
;widget:editvalues = 0


and valuelists.ini:

Code: Select all
[state_list]
__sql__ = "SELECT state_id, postal_abbr FROM states ORDER BY state_name"
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby gthorne » Wed Aug 01, 2012 3:31 pm

Ok, I think my environment variables could be getting messed up somewhere, running two instances of XF on one server. I added this code to head_slot.html:

Code: Select all
<!--
DATAFACE_PATH: {$ENV.DATAFACE_PATH}
DATAFACE_URL: {$ENV.DATAFACE_URL}
DATAFACE_SITE_PATH: {$ENV.DATAFACE_SITE_PATH}
DATAFACE_SITE_URL: {$ENV.DATAFACE_SITE_URL}
DATAFACE_SITE_HREF: {$ENV.DATAFACE_SITE_HREF}
-->


And ended up with this:
Code: Select all
<!--
DATAFACE_PATH: /var/www/html/xf-iso
DATAFACE_URL: http://servername.mysite.com/xf-iso
DATAFACE_SITE_PATH: /var/www/html/isocal
DATAFACE_SITE_URL:
DATAFACE_SITE_HREF: /index.php
-->


(NOTE: I changed the server name in DATAFACE_URL above)

Does this look related? What is the proper way to use XF twice on one server?
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Blank 'Create New' windows

Postby gthorne » Thu Aug 02, 2012 2:35 pm

Ok, I'm not a bright man. I figured out the issue, I'm just not sure how to solve it.

The issue wasn't with the multiple installs, the issue was with the URL's. I have the app in directories like this:
http://myapp.com/dirname

And I have them set up in a subdomain like this:
http://dirname.myapp.com/

The 'create new' windows work with the first url, but not the second.

How do I go about fixing this?
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Next

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 4 guests

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