Email us feature in 3.21 not working?

General bug reports for the Archon software.

Moderators: paulnsorensen, kylefox2, prom, rishel

Email us feature in 3.21 not working?

Postby k.rimkus » Mon Oct 03, 2011 11:52 am

We have Archon 3.21 running on a test server and would like to make the switch from 3.14, but the "email us" feature doesn't seem to work. Are there any particular settings which must be in place for this feature to work? In our current installation, I receive an on-screen "confirmation" that an email has been sent after sending the form, but do not receive any email confirmation (either to my sender or repository addresses). I tried making a request in the Sandbox as well, and didn't receive an email confirmation of having sent a request (as in previous versions of Archon). Is this a bug or a settings issue?

Kyle Rimkus
Head of Digital Scholarship and Programs
University of Miami Libraries
k.rimkus
 
Posts: 22
Joined: Sat May 31, 2008 7:40 am

Re: Email us feature in 3.21 not working?

Postby paulnsorensen » Wed Oct 19, 2011 12:33 am

I'll have to take a look at it and get back to you.
paulnsorensen
Site Admin
 
Posts: 631
Joined: Mon Mar 31, 2008 8:55 am

Re: Email us feature in 3.21 not working?

Postby k.rimkus » Tue Nov 29, 2011 3:29 pm

Hi Paul,

That would be great if you could. In the meanwhile, I've replaced our packages/collections/pub/research.php file in our 3.21 instance with the analogous file from the 3.14 release. Now the email feature is working for us. I understand that 3.21 has an enhanced email feature that routes emails to specific repositories, and we'd love to be able to make use of it, but haven't managed to troubleshoot the source code to see why exactly it isn't working for us right now.

Thanks,

Kyle
Head of Digital Scholarship and Programs
University of Miami Libraries
k.rimkus
 
Posts: 22
Joined: Sat May 31, 2008 7:40 am

Re: Email us feature in 3.21 not working?

Postby gjerdery » Fri May 11, 2012 3:35 pm

We also see the issue that email doesn't sent in 3.21. While the user sending the email gets an affirmative message on the Archon page, there is no record in the mail logs for the server of sent mail.
Reverting to the file from 3.14 allows the email to be sent, along with a confirmation email to the sender.
Version 3.20 of research.php also doesn't work.
gjerdery
 
Posts: 21
Joined: Tue Apr 05, 2011 7:24 pm

Re: Email us feature in 3.21 not working?

Postby gjerdery » Mon Jul 09, 2012 8:34 am

I believe I've fixed this bug in our local instance. I've asked my repository managers to do little testing to confirm, and if that comes back positive, I'll commit to the GitHub repository.

*** I spoke too soon... my "fix" from this morning isn't a true fix. I'll update in the morning with v. 2 of a fix.
gjerdery
 
Posts: 21
Joined: Tue Apr 05, 2011 7:24 pm

Re: Email us feature in 3.21 not working?

Postby gjerdery » Tue Jul 10, 2012 10:09 am

I believe I've found the solution to this, and will post the code to GitHub. Here's what I found. Ultimately, the "Contact Us" form tries to send email via /packages/collections/pub/research.php. Line 539 is the start of the case statement relevant to this issue. It appears that when a user was attempting to send email but had no items in their cart, the $arrDetails var at the start of this case was being set as an empty array, causing the following foreach condition to never be met. So, I added a check to see if that var was !empty, and provided an alternative call to sendEmail() if it was empty.

Here's the new code, which replaces what was found in lines 542-545:
if(!empty($arrDetails))
{
foreach($arrDetails as $RepositoryID => $details)
{
$_ARCHON->sendEmail($_REQUEST['fromaddress'], $_REQUEST['message'], $_REQUEST['referer'], $_REQUEST['fromname'], $_REQUEST['subject'], $_REQUEST['fromphone'], $_REQUEST['details'] . '\n\n' . $details, $_REQUEST['detailsfunction'], $_REQUEST['detailsparams'], $RepositoryID);
}
}
else
{
$_ARCHON->sendEmail($_REQUEST['fromaddress'], $_REQUEST['message'], $_REQUEST['referer'], $_REQUEST['fromname'], $_REQUEST['subject'], $_REQUEST['fromphone'], $_REQUEST['details'], $_REQUEST['detailsfunction'], $_REQUEST['detailsparams']);
}
gjerdery
 
Posts: 21
Joined: Tue Apr 05, 2011 7:24 pm

Re: Email us feature in 3.21 not working?

Postby paulnsorensen » Tue Jul 10, 2012 2:49 pm

Good catch.
paulnsorensen
Site Admin
 
Posts: 631
Joined: Mon Mar 31, 2008 8:55 am

Re: Email us feature in 3.21 not working?

Postby otsymbal » Mon Sep 17, 2012 12:29 pm

I changed the code in line 542-545 (the way GJERDERY suggested); however, the ‘contact us’ form did not work. Yet, when I substitute the file research.php 3.21 with research.php 3.14; the ‘contact us’ form started to work. I am wondering, if old version of the file can have a negative affect for anything? Also, I would like to know if someone could post the working file research.php 3.21

Thanks in advance
otsymbal
 
Posts: 9
Joined: Tue May 20, 2008 9:21 am

Re: Email us feature in 3.21 not working?

Postby gjerdery » Mon Sep 17, 2012 2:31 pm

Here's the page in the GitHub repository for the project that contains a copy of research.php: https://github.com/archonproject/archon ... search.php

Right click on the "Raw" button and save a copy of the file to grab just this file.
gjerdery
 
Posts: 21
Joined: Tue Apr 05, 2011 7:24 pm

Re: Email us feature in 3.21 not working?

Postby otsymbal » Thu Sep 20, 2012 10:56 am

Dear gjerdery,
Your help is greatly appreciated.

;)
otsymbal
 
Posts: 9
Joined: Tue May 20, 2008 9:21 am

Re: Email us feature in 3.21 [it is still not working]

Postby otsymbal » Fri Sep 21, 2012 3:06 pm

Dear gjerdery,
First of all, thank you so much for your support.
I replaced the research file with the one that you suggested and tested with Chrome, Firefox, and Internet Explorer. Three browsers are working perfectly when there is no cart item. However, when I have anything in the cart Firefox, and Internet Explorer are not working. I deleted cookies, restart the browser, and still getting the same problem.

Your help is greatly appreciated,
;)
otsymbal
 
Posts: 9
Joined: Tue May 20, 2008 9:21 am

Re: Email us feature in 3.21 not working?

Postby cnelson » Thu Nov 29, 2012 6:14 pm

Is there an update on this issue? We are having the same problem and before I go trying to replace the files or anything I thought I should ask if this fix has been included in the 3.21-rev1 patch? Thanks,

CNelson
cnelson
 
Posts: 66
Joined: Tue Jan 05, 2010 11:23 am

Re: Email us feature in 3.21 not working?

Postby prom » Fri Nov 30, 2012 4:29 pm

It has not been included in r-1. We will probably need to do at least one more update to archon, and r-2 since there are several other outstanding issues. In the meantime, please grab the file from github.

Chris
Chris Prom
Assistant University Archivist
Archon co-Project Director
217 333 0798
prom
 
Posts: 144
Joined: Thu Sep 13, 2007 8:57 am
Location: U Illinois


Return to Archon Bugs

Who is online

Users browsing this forum: No registered users and 0 guests

cron