1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Digital Signature Not Showing Up in Email Body

Discussion in 'Community' started by teoyh, Jun 4, 2019.

  1. teoyh

    teoyh Member

    Level: Community
    Digital_Signature_Issue.jpg

    Not sure why the signature in not showing up but some raw code instead.

    I try using this method, it did not work as well ;

    $PID=JRequest::getInt('rowid');
    $orgdigi = "index.php?option=com_fabrik&task=plugin.pluginAjax&plugin=digsig&method=ajax_signature_to_image&format=raw&element_id=9553&formid=582&rowid=".$PID."&repeatcount=0";
    $message = 'Dear '.$custname.'; <br><br>We hereby issue you a total of <b>'.$qty.'</b> taxi voucher of card no <b>'.$cardstart.'</b> to <b>'.$cardend.'</b>. <br><br>Please note the validity date of the voucher will be from '.$startdate.' to '.$enddate.', thereafter the taxi voucher will not be usuable. <br>You had acknowledge the receipt of this voucher on <b>'.$today.'</b><br><br>Your acknowledgement <br><br>'.$orgdigi;
    $res = FabrikWorker::sendMail($MailFrom,$FromName,$email,$subject,$message,true,$Cc,$Bcc,$attachment);

    The image from $orgdigi will show when the user is login if not login it will not show

    Appreciate someone can help me with this many thanks
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Did you try to add the digsig_pdf_secret to your Url? It's used for PDF rendering maybe it will help also in email .
    upload_2019-6-4_14-38-52.png
    ...plugins\fabrik_element\digsig\digsig.php
    upload_2019-6-4_14-38-33.png


    BUT
    in case this is working: don't show something like this URL in the email, it would expose the "secret" and so giving access to any of your signatures to the public
     
    Last edited: Jun 4, 2019
  3. teoyh

    teoyh Member

    Level: Community
    Thank you i will check this out
     
  4. teoyh

    teoyh Member

    Level: Community
    I don;t think it work, i tested this by first logout and paste the link direct it does not show the image;
    index.php?option=com_fabrik&task=plugin.pluginAjax&plugin=digsig&method=ajax_signature_to_image&format=raw&element_id=955&formid=582&rowid=3&repeatcount=0&pdf_secret='abcd1234'
     
  5. teoyh

    teoyh Member

    Level: Community
    Friend Bump :)
     
  6. teoyh

    teoyh Member

    Level: Community
    In digisig.php;
    when the user is not login the value $json_sig will be null even if the pdfsecret is available
    $elName = $this->getFullName(true, false);
    $json_sig = $row->$elName;

    I added below to get the value and then it will work, but now sure is this is a good idea as i am making changes to the core
    if($json_sig==NULL){
    $db = JFactory::getDBO();
    $db->setQuery("SELECT signature FROM stmv3data.etaxi_voucher_registration where id='$rowId'");
    $json_sig = $db->loadResult();
    }
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Do you have an ACL on the digsig element itself, as well as on the list?

    Also, in your example URL in the previous post you have quotes around the secret, which (unless you actually have quotes in the secret you defined) won't work.

    -- hugh
     

Share This Page