EPSCoR / ERCore

ERcore content management system to assist with NSF EPSCoR reporting
4 stars 7 forks source link

External Engagement Excel Upload Not Working on 3.1 version #29

Open iserna opened 8 years ago

iserna commented 8 years ago

I received a notification from Utah EPSCoR that the Excel Upload for External Engagement is not working. When I tested my most recent MAMP install (3.1) I get the same issues.

I tested http://dev-ercore.nmepscor.net/ multiple times and was successful once...not sure why all the others did not work.

Can everyone check to see if this upload feature is working on their sites?

Thanks, Isis

aturling commented 8 years ago

Does "not working" mean that the file upload isn't working, or that the file uploads but the information from the upload isn't being extracted correctly?

The most recent version of the entityreference prepopulate module (version 7.x-1.5) breaks the xls file upload, so that's one thing to check.

khuffman commented 8 years ago

@iserna on your http://dev-ercore.nmepscor.net you are using entityreference prepopulate module version 7.x-1.5, and I agree with @aturling , I have never got the Excel Upload for External Engagement working if I have this 1.5 version of entityreference prepopulate module. The error I got when I was using the 1.5 version was: "The form has become outdated. Copy any unsaved work in the form below and then reload this page.” Is this the same error that you get?

iserna commented 8 years ago

@aturling the system will not upload the spreadsheet, get the error "the form is outdated". Same as what @khuffman describes. I will try entityreference prepopulate module 1.5 and see if that solves it, sound like it will:)

aturling commented 8 years ago

A while back I tried to figure out what causes the error in entityreference prepopulate version 1.5 so that we could fix the ER Core code, but I didn't get too far. I narrowed it down to this function in the ER Core code in includes/form_logic.inc:

function _deny_direct_form_access(&$form)

specifically the part that wipes the form if the calendar event isn't filled in. When I commented that out, the error went away, but then the form isn't disabled on node/add/er-engagement so people could ignore the error message at the top.

But I didn't see how the changes in the module would suddenly break that part of the code, when most of the changes deal with its integration with organic groups, and we aren't using those.

khuffman commented 8 years ago

@aturling back in Oct 2014, when we were dealing with this issue, I got below email response (10/01/2014) from Chase (Hawaii developer, Isis you should have the same email..he copied you and Chris). It is some AJAX issue, see the link Chase sent.

Hi Kia, You might want to try updating the Entityreference Prepopulate to the Dev version (7.x-1.x-dev) http://ftp.drupal.org/files/projects/entityreference_prepopulate-7.x-1.x-dev.tar.gz I don't think it's a finalized fix, as it's still in dev but that seemed to do the trick on my local install. Chris, Thanks for the tip on updating JQuery! Didn't solve the problem directly but got me thinking about ajax specifically and after some poking around I stumbled across: https://www.drupal.org/node/1958800

Sounds like the issue has been around for a while...fixed, then broken again. Tx, -chase

khuffman commented 8 years ago

@aturling In my chaotic er-core email archive I also found this email from Chris 12/04/2014. Isis you should have this one too. So Chris has a workaround...but we in RI went with option3. just using the 1.4 version, that doesn't cause this problem.

Kia - So, i further explored this issue and confirm that entityPrePop module version 1.5 breaks with our ERCore 3.0. Further investigation revealed that it has to do with the ajax upload not cooperating with Entity Reference Pre Populate url on the External Engagement (EE) content type.

A work around I discovered was: 1) Create the calendar event 2) Attach attendee data; notice the URL - node/add/er-engagement?field_er_cal_entity_reference=34 3) Save the EE with no attendee data 4) Now, click on “edit” on the EE you just created 5) Notice the URL now - /node/39/edit 6) Attach excel file; which the ajax functions correctly. 7) EE is saved and all is good.

Possible Solutions:

1) Modify ERCore (/er/er.module — line 972-989 to direct users to a new EE page that does not have attendee data attached to it. I recommend against this 2) Update to Entity Reference Pre Populate Dev version 7.x.1.5+5-dev :: last updated: March 26, 2014 I installed this on our dev server and it resolves the ajax error on the EE excel upload I assume a new version may be on it’s way? 3) Continue using Entity Reference Pre Populate version 1.4 (one version back) until a new stable 1.6 is released.

Here at NM on our live site we are implementing option 3 for the time being.

-Chris

iserna commented 8 years ago

@tschet will test on ND EPSCoR site and report back with results.

tschet commented 8 years ago

I can confirm that ND EPSCoR was having the same issues. I also tested the work-around mentioned by khuffman above, saving the node first, then uploading. That worked as described.

I chose rolling back to entityrefreence_prepolulate 1.4 , and that resolved the issue.

iserna commented 8 years ago

@tschet thank you for testing this and confirming the issue and two solutions. I will update the installation guide to include both solutions to this issue.

tschet commented 8 years ago

I just added a pull request add an example drush make file to the module. It will download the ERCore module, and all dependencies, including the ExcelPHP library. The .make file specifies the correct version for entityreference_prepopulate, but leaves the other dependencies without specific versions. The version dependency can be removed when the issue is resolved.

iserna commented 8 years ago

Is everyone still running Entity Reference Prepopulate 1.4? NM is running 1.6 but we do not use the EE upload feature.

tschet commented 8 years ago

The default install still doesn't appear to work with the newer versions of Entity Reference Prepopulate. at least not for me.

aturling commented 8 years ago

We're still on Entity Reference Prepopulate 1.4. I’m not sure if our users use the Excel upload but I wanted to keep the option open.

khuffman commented 8 years ago

We are also still using Entity Reference Prepopulate 1.4, because our users use the Excel upload frequently.

Kia

On 04/06/2016 03:59 PM, Amy Walsh wrote:

We're still on Entity Reference Prepopulate 1.4. I’m not sure if our users use the Excel upload but I wanted to keep the option open.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/EPSCoR/ERCore-3.1/issues/29#issuecomment-206533433