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

Comments

socialnicheguru’s picture

Title: There are no entities matching "(1)" » Can't create events: Error is : There are no entities matching "(1)"
StatusFileSize
new65.55 KB

Here is a photo

jpontani’s picture

Assigned: Unassigned » jpontani
socialnicheguru’s picture

autocomplete works but autocomplete tags does not

WebSinPat’s picture

I 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.

vitchy’s picture

Same ! 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.

jpontani’s picture

Status: Active » Postponed (maintainer needs more info)

Can 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.

vitchy’s picture

StatusFileSize
new39.58 KB

I 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.

vitchy’s picture

Version: » 7.x-3.2

change version

jpontani’s picture

Doing 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.

jpontani’s picture

Title: Can't create events: Error is : There are no entities matching "(1)" » User entity reference field breaks when both first and last name fields for a user are blank

Changing title to the real problem.

WebSinPat’s picture

I confirm that adding a first name for my users allows me to create an event without error.

jpontani’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new823 bytes

This 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.

WebSinPat’s picture

the patch in #12 seems to work for me, allows a user with no first/last name to create an event.

jpontani’s picture

Status: Needs review » Fixed

Per #13, going to commit. If this continues to be an issue, please reopen.

http://drupalcode.org/project/commons_events.git/commit/954e9a6

prathK’s picture

Hi,

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

Status: Fixed » Closed (fixed)

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