Page 1 of 2

[SOLVED] Blank 'Create New' windows

PostPosted: Tue Jul 24, 2012 4:02 pm
by gthorne
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?

Re: Blank 'Create New' windows

PostPosted: Wed Jul 25, 2012 12:08 pm
by shannah
What browser are you using? Are there any javascript errors showing up?

-Steve

Re: Blank 'Create New' windows

PostPosted: Wed Jul 25, 2012 2:30 pm
by gthorne
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

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 7:27 am
by gthorne
Could I get this moved to 'Xataface Users' for more visibility?

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 10:53 am
by shannah
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

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 12:18 pm
by gthorne
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.

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 12:24 pm
by gthorne
Could you tell me how/where these fields are generated? It may be something I could track down with some debugging statements.

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 1:43 pm
by gthorne
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];

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 2:00 pm
by shannah
I must misunderstand what you mean by "blank window". There was an "OK" button in the blank window? Was there anything else?

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 2:22 pm
by gthorne
It has the standard title bar, and OK button. Here's a screenshot.

screenshot.jpg
screenshot.jpg (21.84 KiB) Viewed 102874 times

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 2:50 pm
by shannah
Does it work if you access the new record form of the states table directly?

Re: Blank 'Create New' windows

PostPosted: Mon Jul 30, 2012 2:57 pm
by gthorne
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.

Re: Blank 'Create New' windows

PostPosted: Wed Aug 01, 2012 1:28 pm
by gthorne
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"

Re: Blank 'Create New' windows

PostPosted: Wed Aug 01, 2012 3:31 pm
by gthorne
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?

Re: Blank 'Create New' windows

PostPosted: Thu Aug 02, 2012 2:35 pm
by gthorne
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?