Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: SVN trunk
    • Component/s: None
    • Labels:
      None

      Description

      Email password feature in party manager is broken. The log shows:
      2010-05-28 09:24:58,193 (http-0.0.0.0-8543-14) [ ControlServlet.java:131:INFO ] [[[forgotPassword] Request Begun, encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
      2010-05-28 09:24:58,268 (http-0.0.0.0-8543-14) [ RequestHandler.java:597:INFO ] Ran Event java:org.ofbiz.securityext.login.LoginEvents#forgotPassword from [request], result is [success]
      2010-05-28 09:24:58,275 (http-0.0.0.0-8543-14) [ RequestHandler.java:704:INFO ] Rendering View [forgotPassword], sessionId=6B88D615C7E15A7F8A3D1238F3447D27.jvm1
      2010-05-28 09:24:58,278 (http-0.0.0.0-8543-14) [ ScreenRenderer.java:106:INFO ] render screen: forgotPassword, resource: component://common/widget/CommonScreens.xml
      2010-05-28 09:24:58,325 (http-0.0.0.0-8543-14) [ PrimaryKeyFinder.java:142:INFO ] Returning null because found incomplete primary key in find: [GenericEntity:PartyNameView][partyId,null()]
      2010-05-28 09:24:58,520 (http-0.0.0.0-8543-14) [ ServerHitBin.java:691:INFO ] Duplicate ServerHit was updated: [GenericEntity:ServerHit][contentId,partymgr.forgotPassword(java.lang.String)][createdStamp,2010-05-28 09:24:58.518(java.sql.Timestamp)][createdTxStamp,2010-05-28 09:24:58.516(java.sql.Timestamp)][hitStartDateTime,2010-05-28 09:24:58.193(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-05-28 09:24:58.518(java.sql.Timestamp)][lastUpdatedTxStamp,2010-05-28 09:24:58.516(java.sql.Timestamp)][referrerUrl,https://ntc:8543/partymgr/control/main(java.lang.String)][requestUrl,https://ntc:8543/partymgr/control/forgotPassword(java.lang.String)][runningTimeMillis,322(java.lang.Long)][serverHostName,domU-12-31-39-00-0F-51(java.lang.String)][serverIpAddress,10.254.31.159(java.lang.String)][visitId,25693(java.lang.String)]
      2010-05-28 09:24:58,521 (http-0.0.0.0-8543-14) [ ControlServlet.java:300:INFO ] [[[forgotPassword] Request Done- total:0.327,since last([forgotPassword] ...):0.327]]
      2010-05-28 09:25:02,715 (http-0.0.0.0-8543-15) [ ControlServlet.java:131:INFO ] [[[forgotPassword] Request Begun, encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
      2010-05-28 09:25:03,074 (http-0.0.0.0-8543-15) [ UtilProperties.java:871:INFO ] ResourceBundle SecurityextUiLabels (en_US) created in 0.12s with 53 properties
      2010-05-28 09:25:03,075 (http-0.0.0.0-8543-15) [ RequestHandler.java:597:INFO ] Ran Event java:org.ofbiz.securityext.login.LoginEvents#forgotPassword from [request], result is [error]
      2010-05-28 09:25:03,110 (http-0.0.0.0-8543-15) [ RequestHandler.java:400:ERROR] Request forgotPassword caused an error with the following message: Problems with configuration; please contact customer service.
      2010-05-28 09:25:03,111 (http-0.0.0.0-8543-15) [ RequestHandler.java:704:INFO ] Rendering View [forgotPassword], sessionId=6B88D615C7E15A7F8A3D1238F3447D27.jvm1
      2010-05-28 09:25:03,116 (http-0.0.0.0-8543-15) [ ScreenRenderer.java:106:INFO ] render screen: forgotPassword, resource: component://common/widget/CommonScreens.xml
      2010-05-28 09:25:03,141 (http-0.0.0.0-8543-15) [ PrimaryKeyFinder.java:142:INFO ] Returning null because found incomplete primary key in find: [GenericEntity:PartyNameView][partyId,null()]
      2010-05-28 09:25:03,380 (http-0.0.0.0-8543-15) [ ServerHitBin.java:691:INFO ] Duplicate ServerHit was updated: [GenericEntity:ServerHit][contentId,partymgr.forgotPassword(java.lang.String)][createdStamp,2010-05-28 09:25:03.378(java.sql.Timestamp)][createdTxStamp,2010-05-28 09:25:03.376(java.sql.Timestamp)][hitStartDateTime,2010-05-28 09:25:02.715(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-05-28 09:25:03.378(java.sql.Timestamp)][lastUpdatedTxStamp,2010-05-28 09:25:03.376(java.sql.Timestamp)][referrerUrl,https://ntc:8543/partymgr/control/forgotPassword(java.lang.String)][requestUrl,https://ntc:8543/partymgr/control/forgotPassword(java.lang.String)][runningTimeMillis,660(java.lang.Long)][serverHostName,domU-12-31-39-00-0F-51(java.lang.String)][serverIpAddress,10.254.31.159(java.lang.String)][visitId,25693(java.lang.String)]
      2010-05-28 09:25:03,381 (http-0.0.0.0-8543-15) [ ControlServlet.java:300:INFO ] [[[forgotPassword] Request Done- total:0.665,since last([forgotPassword] ...):0.665]]

      1. emailPasswd.diff
        7 kB
        BREMA Dev Team
      2. Screen shot 2010-05-28 at 9.25.05 AM.png
        36 kB
        Si Chen

        Issue Links

          Activity

          Hide
          Jacques Le Roux added a comment - - edited

          It's because we are missing the productstoreid in Website entity for some components (here Party).

          Not quite sure how to handle it, we could put 9000 OOTB there for all "missing components", but sounds like a kludge

          Show
          Jacques Le Roux added a comment - - edited It's because we are missing the productstoreid in Website entity for some components (here Party). Not quite sure how to handle it, we could put 9000 OOTB there for all "missing components", but sounds like a kludge
          Hide
          BREMA Dev Team added a comment -

          There is no productStoreId in the session for an user of a back application, and ProductStoreEmailSetting is not available. This is the reason.
          However we can use default template and default sender's address from general.properties in this case. See the patch.
          Also we removed some dead code.

          Show
          BREMA Dev Team added a comment - There is no productStoreId in the session for an user of a back application, and ProductStoreEmailSetting is not available. This is the reason. However we can use default template and default sender's address from general.properties in this case. See the patch. Also we removed some dead code.
          Hide
          Jacques Le Roux added a comment -

          Hi,

          I don't see any reasons to remove this block

                  if (supposedUserLogin == null) {
                      // the Username was not found
                      Map<String, String> messageMap = UtilMisc.toMap("userLoginId", userLoginId);
                      errMsg = UtilProperties.getMessage(resource, "loginevents.user_with_the_username_not_found", messageMap, UtilHttp.getLocale(request));
                      request.setAttribute("_ERROR_MESSAGE_", errMsg);
                      return "error";
                  }
          

          Could you explain?

          Show
          Jacques Le Roux added a comment - Hi, I don't see any reasons to remove this block if (supposedUserLogin == null ) { // the Username was not found Map< String , String > messageMap = UtilMisc.toMap( "userLoginId" , userLoginId); errMsg = UtilProperties.getMessage(resource, "loginevents.user_with_the_username_not_found" , messageMap, UtilHttp.getLocale(request)); request.setAttribute( "_ERROR_MESSAGE_" , errMsg); return "error" ; } Could you explain?
          Hide
          BREMA Dev Team added a comment -

          This isn't part of the fix, just dead code. We have already similar "if" with return at beginning of the "try" block above.

          Show
          BREMA Dev Team added a comment - This isn't part of the fix, just dead code. We have already similar "if" with return at beginning of the "try" block above.
          Hide
          Jacques Le Roux added a comment -

          BREMA Dev Team,

          Your patch is in trunk at r 1307895. But I put this note in the commit comment:

          This uses "general.properties", "defaultFromEmailAddress". So to work correctly it still needs "defaultFromEmailAddress" (default =ofbiztest@example.com), "mail.smtp.relay.host" (default =localhost) and such to be set correctly... In other words the message "A new password has been created and sent to you. Please check your Email." could even more misleading if people are not aware about setting SMTP in general.properties...

          So, for now, I did not backport in releases, nor close this issue, waiting for the community reaction about that SMTP issue.

          Show
          Jacques Le Roux added a comment - BREMA Dev Team, Your patch is in trunk at r 1307895. But I put this note in the commit comment: This uses "general.properties", "defaultFromEmailAddress". So to work correctly it still needs "defaultFromEmailAddress" (default =ofbiztest@example.com), "mail.smtp.relay.host" (default =localhost) and such to be set correctly... In other words the message "A new password has been created and sent to you. Please check your Email." could even more misleading if people are not aware about setting SMTP in general.properties... So, for now, I did not backport in releases, nor close this issue, waiting for the community reaction about that SMTP issue.
          Show
          Jacques Le Roux added a comment - Closing, see http://svn.apache.org/viewvc?rev=1310716&view=rev

            People

            • Assignee:
              Jacques Le Roux
              Reporter:
              Si Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development