I get the following Ajax error when trying to use the sign up link in a view

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/view/events/preview/page/ajax
StatusText: OK
ResponseText:
Fatal error: Cannot access empty property in /Library/WebServer/Documents/mysite/sites/all/modules/signup/views/handlers/signup_handler_field_signup_node_link.inc on line 44

Im having a number of problems with sign-up in D7 and would appreciate any help or guidance in getting this to work event a interim fix would be great.

thanks

Comments

chaloum’s picture

I've installed to current version on Signup and am still getting an AJAX error when trying to add the signup link to a view.

is there a patch available that can fix this?

jordojuice’s picture

Can you paste the Views query so we can have a look?

chaloum’s picture

@jordojuice

this is the Ajax error

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/view/events/preview/page/ajax
StatusText: OK
ResponseText: 
Fatal error:  Cannot access empty property in /Library/WebServer/Documents/mysite/sites/all/modules/signup/views/handlers/signup_handler_field_signup_node_link.inc on line 44

and theis is the sql

SELECT node.nid AS nid, node.title AS node_title, field_data_field_date.field_date_value AS field_data_field_date_field_date_value, 'node' AS field_data_field_sessions_node_entity_type, 'node' AS field_data_field_date_node_entity_type, 'node' AS field_data_field_location_node_entity_type
FROM 
{node} node
LEFT JOIN {field_data_field_locations} field_data_field_locations ON node.nid = field_data_field_locations.entity_id AND (field_data_field_locations.entity_type = 'node' AND field_data_field_locations.deleted = '0')
INNER JOIN {node} node_field_data_field_locations ON field_data_field_locations.field_locations_target_id = node_field_data_field_locations.nid
LEFT JOIN {field_data_field_date} field_data_field_date ON node.nid = field_data_field_date.entity_id AND (field_data_field_date.entity_type = 'node' AND field_data_field_date.deleted = '0')
WHERE (( (node.status = '1') AND (node.type IN  ('pathways')) ))
ORDER BY field_data_field_date_field_date_value ASC
LIMIT 100 OFFSET 0
jordojuice’s picture

Ahh I reproduced this. I'll try to come up with a patch for it.

jordojuice’s picture

Status: Active » Needs review
StatusFileSize
new1013 bytes

Alright. This patch should fix the issue. I have another patch at #1285536: SQL error when using Signup: Enabled/Disabled (Enabled) that fixes a bug in the signup enabled/disabled filter as well if you need it.

jordojuice’s picture

@chaloum Can you test or have you tested this patch? You should be able to paste the few lines if you don't do patches.

jordojuice’s picture

Status: Needs review » Closed (duplicate)
sgabe’s picture

Title: I get the following Ajax error when trying to use the sign up link in a view » Ajax error when trying to use the sign up link in a view
Status: Closed (duplicate) » Needs review

We should treat this separately and not merge with other issues.

sgabe’s picture

StatusFileSize
new1008 bytes

Adding nid as an additional field eliminates the error message but the field will not show up because of the missing option_definition() the attached patch also adds this.

jordojuice’s picture

Looks good. Works for me.
+1

chaloum’s picture

@sgabe

when I apply this patch I no longer have the "Signup: Node: Signup link" available. So it isn't working for me

sgabe’s picture

@chaloum: try it on a clean install and apply the patch against the latest version in the repository. However you should recreate and save again your views where you are using this field.

By the way what do you mean exactly by "available"? Can't you see the Signup: Node: Signup link field on the administration page among the others, so you can't add it to a view? Or is it not displayed in the view?

chaloum’s picture

sgabe, No longer have the "Signup: Node: Signup link" available = was previously there (available) and no longer there (no longer available)

available as in to use, either in the view creation and it follows that it doesn't display in a view either

sgabe Does the Development release contain all the other patches? I'm nervous about doing a fresh install particularly with the Recommended Release as there are so many different of patches covering various issues flying around, I could end up in a worse situation than I am in ATM.

sgabe’s picture

@chaloum: The reason why the patch does not work for you can be that you have applied numerous unverified patches.

The most important thing about bugs is "If you cannot reproduce it, you cannot fix it!". The patch seems to work for jordojuice and me too. So somebody needs to help us reproduce the bug (if there is still a bug) or we will not be able to fix it.

Since you are the one who reported the problem, you should try to reproduce it on a clean install (absolutely clean system with just the needed modules). If the problem persist, try to provide the steps to reproduce it. Reverting the views provided by the module to default may help.

sgabe’s picture

Status: Needs review » Fixed

The patch seems to be fine. If there is still a problem, it most likely will be something else (and will be another issue), so I went ahead and committed the patch in #9.

generalconsensus’s picture

@chaloum the issue you might be seeing is possibly related to http://drupal.org/node/1460382. It's looking that something needs to be done with the date include file as it currently stands. I'm also still trying to figure out what is going wrong with date/signup and using the signup link here is another link to more info http://drupal.org/node/1452920

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.