Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collaboration CT error - #7

Closed
cjallen-epscor opened this issue Mar 6, 2015 · 7 comments
Closed

Collaboration CT error - #7

cjallen-epscor opened this issue Mar 6, 2015 · 7 comments

Comments

@cjallen-epscor
Copy link
Contributor

When clicking on "Add a name to this collaboration" the User lookup populates all data with the exception of the referenced user's institution being checked.

@aturling @khuffman -- can you verify that this is the same for your installs?

@aturling
Copy link
Member

aturling commented Mar 6, 2015

I'm not seeing this on the test site. Just to verify - here are the steps I took to try to recreate this:

  • create new collaboration
  • add a collaborator to the collaboration
  • lookup user and select "auto-fill fields below"
    When I do that, the user's institution is auto-selected (radio buttons). I tested it with one user from a "participating institution" and one from a "non-participating institution" and it worked both ways.

@cjallen-epscor
Copy link
Contributor Author

@aturling - is this at http://dev-ercore.nmepscor.net ?

I tried on Firefox, Chrome, and Safari and the user's institution is still not being selected....

@aturling
Copy link
Member

aturling commented Mar 6, 2015

Ok I see what you're talking about, I did get the error at dev-ercore. But it's not showing up on our live reporting site or my offline test site. I was looking through the modules to see what the differences are. I don't know if this affects anything, but here's what I see:

Dev-ercore

  • Entity API version 7.x-1.5
  • Entity tokens 7.x-1.5

MO reporting site/test site

  • Entity API version 7.x-1.6
  • Entity tokens 7.x-1.6

Some modules installed on Dev-Ercore that aren't installed on MO live/test sites:
CCK, Node Reference, References, User Reference

plus some other differences that wouldn't be relevant here (like the different versions of the Flag module)

@cjallen-epscor
Copy link
Contributor Author

@aturling - I did investigate the modules and jQuery versions and nothing seemed to work.
This feature works correctly on our live NM install and that install has the same setup as yours.

As a testing measure, this fails to fire the institution on my local turnkey testing site; which does have everything up to date. Very strange.

@khuffman - is your install having the same issue?

@khuffman
Copy link
Contributor

khuffman commented Mar 6, 2015

I tested on my laptop's er-core* and I do not see this error.
Everything works fine (after I type in the first few character of
someone's name, then it shows me their full name, and then I click
"Auto-fill fields below" and it fills in everything correctly including
the Institution, I do not see any errors.)

I'm doing it as a user who has er's "Administrative Staff" role.
What user-role are you trying this as?

Also make sure that the Institution for the user you are adding is not
"DRAFT" (go to EPSCoR->EPCoR Content->Institutions
In the list make sure the institution that the user belongs to is not
set to DRAFT.)

I have these modules both my laptop/live site:
Entity API 7.x-1.6
Entity tokens 7.x-1.6
Entity Reference 7.x-1.1
Entity reference prepopulate 7.x-1.4

Kia
*which is almost a clone of our live site (I cloned it today so I
haven't messed it up too much, only difference is I added Amy's new team
view to my laptop this afternoon)

On 03/06/2015 05:36 PM, Chris Allen wrote:

@aturling https://github.com/aturling - I did investigate the modules
and jQuery versions and nothing seemed to work.
This feature works correctly on our live NM install and that install has
the same setup as yours.

As a testing measure, this fails to fire the institution on my local
turnkey testing site; which does have everything up to date. Very strange.

@khuffman https://github.com/khuffman - is your install having the
same issue?


Reply to this email directly or view it on GitHub
#7 (comment).

@cjallen-epscor
Copy link
Contributor Author

Update:
Strange. When I was in the system today - I was getting the error:

Strict warning: Only variables should be passed by reference in er_form_er_collaborators_node_form_alter() (line 121 of /var/www/dev-ercore.nmepscor.net/sites/all/modules/epscor_reporting_core/includes/form_logic.inc).

            $arraypopvalue = $u->field_er_inst_ref->raw();
        $form_state['input']['field_er_collab_inst_ref']['und'] = array_pop($arraypopvalue);
        // Earlier/original code    
            //$form_state['input']['field_er_collab_inst_ref']['und'] = array_pop($u->field_er_inst_ref->raw());    

    // This works but is invalid with newer PHP versions
            // 
    // New Version - that resolves the error:
    //
    // modified by Chris - cjallen@epscor.unm.edu
    $arraypopvalue = $u->field_er_inst_ref->raw();
    $form_state['input']['field_er_collab_inst_ref']['und'] = array_pop($arraypopvalue);

After performing those changes dev-ercorenmepscor.net now populates the institution for collaborations.

I will apply this patch into ERCore 3.1-dev

@cjallen-epscor
Copy link
Contributor Author

Patch committed at 4148534

@cjallen-epscor cjallen-epscor added this to the 3.1 milestone Apr 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants