Closed (fixed)
Project:
Drupal Commons
Version:
7.x-3.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
4 May 2013 at 01:20 UTC
Updated:
18 Jun 2013 at 11:50 UTC
Jump to comment: Most recent file
I get this error for organizer when I create event content.
I get it even if I then go back and fill in the entry with a username
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | commons_events.1986564.organizer_entityref_field.patch | 823 bytes | jpontani |
| #7 | error_drupal.jpg | 39.58 KB | vitchy |
| #1 | commons-create-error-event2.jpg | 65.55 KB | socialnicheguru |
Comments
Comment #1
socialnicheguru commentedHere is a photo
Comment #2
jpontani commentedComment #3
socialnicheguru commentedautocomplete works but autocomplete tags does not
Comment #4
WebSinPat commentedI get the same error. Cannot create an event.
I'm running DC 7.x.3.2
Note: the entity it cannot match is the userid of the user creating the event. the "organizer" seems irrelevant, or at least changing the organizer to a different user still results in an error message referencing the logged in userid.
Comment #5
vitchy commentedSame ! A simple workaround is to change the widget from Autocompletion (tag style) to Autocompletion but can't set defaut value as author creating the node.
Comment #6
jpontani commentedCan you describe how to duplicate? I just did a fresh install of 3.2 and am unable to reproduce this, trying with both administrator role and just authenticated user role.
Comment #7
vitchy commentedI just installed a fresh drupal commons installation and i can reproduce this only with the first created account during commons installation (uid 1 ).
With other user, whatever role admin or simple member, i don't have any error and i can save my event.
To see error, i add a file attachment.
Comment #8
vitchy commentedchange version
Comment #9
jpontani commentedDoing a quick test reveals that the autocomplete is searching by the realname aspect of users, which is tokenized to being "[first_name] [last_name]", and if it's not set, then the error from above occurs. The quick fix is to just set at least the firstname of the admin user. I'll have to dig deeper as to why Entity Reference isn't reverting to the username when the first/last name fields are blank.
Comment #10
jpontani commentedChanging title to the real problem.
Comment #11
WebSinPat commentedI confirm that adding a first name for my users allows me to create an event without error.
Comment #12
jpontani commentedThis patch should fix the issue. The problem was I was doing a forced default value on the organizers field of the current user, using the values of first name and last name field, rather than calling format_username which takes into account the realname module's username altering.
Comment #13
WebSinPat commentedthe patch in #12 seems to work for me, allows a user with no first/last name to create an event.
Comment #14
jpontani commentedPer #13, going to commit. If this continues to be an issue, please reopen.
http://drupalcode.org/project/commons_events.git/commit/954e9a6
Comment #15
prathK commentedHi,
I faced this issue in DC 3.0 and when I updated with the latest patch provided by you it worked fine.
Thanks !!!!
prathK
http://extrimity.in