• Hi! Thanks for your plugin, it’s great.

    However, when I use the [record_link] tag in an email, it just appears exactly the same when the email is received, it isn’t resolved into the appropriate URL.

    Any ideas how I can debug/fix this?

    Thanks!
    Julie

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Julie Lawrence

    (@julie-lawrence)

    Oh, and all the other tags work fine, including [admin_record_link], just not this one.

    Thread Starter Julie Lawrence

    (@julie-lawrence)

    Oh, and yes, I’ve added the page with the [pdb_record] shortcode, to the Record Form Settings tab of the Settings page.

    Plugin Author xnau webdesign

    (@xnau)

    I just tested this, and it is working s expected, but I’m testing the emails that get sent out when a signup happens.

    What are the circumstancers where your site is sending an email?

    Thread Starter Julie Lawrence

    (@julie-lawrence)

    Thanks for your response!!! Much appreciated!! And you’re right, I just tested it with the signup process, and it works.

    My failure is when I’m testing sending out the “send edit link/password recovery code” email. All i get in the email is this:

    Here is the private link you requested from Mount Nebo website, so that you can update your details.

    [record_link]

    i.e. the [record_link] shortcode isn’t being replaced by the appropriate URL.

    Any ideas how to debug this?

    Thanks!!
    Julie

    Plugin Author xnau webdesign

    (@xnau)

    It sounds like you’re talking about using the admin List Participants “With selected” function, right?

    There are two reasons the [record_link] tag can fail to be replaced that I can think of: the plugin can’t determine the record ID, or there is a syntax error in the email template. If you’ve got one or more records selected in the list when you send the email, then the ID for each record should be known. The template issue is probably something that looks fine, but isn’t. Take a close look at the “Lost Private Link Email” setting under the Resend Link tab in the plugin settings. Check it using the “text” tab of the editor and make sure there’s isn’t anything hidden in there messing up the tag.

    If you’re using template in the Email Expansion Kit for this, you should check that one.

    Thread Starter Julie Lawrence

    (@julie-lawrence)

    >> It sounds like you’re talking about using the admin List Participants “With selected” function, right?

    Yes, correct.

    Here’s what i’ve tried, and now it IS sending links, but none of them work.

    1. I noticed that my imported records didn’t have a Private ID, whereas ones created with the signup form DO, so I exported them all, and re-imported. Now they all DO have a private ID – but it’s all the SAME ONE, RPNE2! I’ve managed to update in phpMyAdmin like this:
    UPDATE xx_participants_database
    SET private_id = UPPER(SUBSTR(MD5(RAND()), 1, 5))

    2. [This one happened BEFORE I updated the private IDs, as above]
    I do NOT have the “Use the Private ID for the Single Record Link” option checked, but when I tried to send the link as you describe above, using a template I set up using the Email plugin, the link I get is: https://www.mtnebo.org.au/participants-database-public-list/participants-database-edit-record/?pid=RPNE2
    – ie. it’s using the PID, NOT the record id.
    Furthermore, the underlying URL is:
    https//https://www.mtnebo.org.au/participants-database-public-list/participants-database-edit-record/?pid=RPNE2
    – i.e. no colon in https:// … so it doesn’t work (and wouldn’t anyway, cos it’s a much-duplicated private ID)

    3. WHen I send the email using the built in “send edit link/password recovery email”, the link is get is: https://www.mtnebo.org.au/participants-database-public-list/participants-database-edit-record/ – i.e. NO record OR private ID.

    4. When I send email using a template I created, with [record_link], I now get the same as in [3].

    5. My site kept randomly crashing during all this, and I could only get it back by disabling your Email plugin. I think this is the message generated in the debug log when that happens:
    Cannot modify header information – headers already sent
    in /home/mtneboor/public_html/wp-content/plugins/participants-database/classes/PDb_Session.php on line 377

    I am at a loss and have no idea how to sort this out. Do you have any ideas???

    Thank you!

    Thread Starter Julie Lawrence

    (@julie-lawrence)

    Oh, I’ve just found that what’s actually in the email is this (which doesn’t help me, it still takes me to “record not found” … I’m just sending it in case it helps you understand what might be going on.)

    <iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" 
    style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" 
    title="“Update your details 
    [pdb_record]” — Mt Nebo Resident's Association" 
    src="https://www.mtnebo.org.au/participants-database-public-list/participants-database-edit-record/embed/#?secret=Qm4XghdtjF#?secret=jDDT87L7i4" 
    data-secret="jDDT87L7i4" 
    width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
    Plugin Author xnau webdesign

    (@xnau)

    First of all, make sure you’re using the latest version of the plugin, I don’t know if I mentioned that before, but it is very important.

    RPNE2 is the private ID of the former “default record” the plugin used originally, and its use was phased out years ago, so seeing that surface is puzzling.

    It appears your database is corrupted, and I don’t know how it got that way. And there are other things going on that I can’t explain like the random crashes, which isn’t something even a corrupted database can do.

    I would suggest you rebuild the database, and I know you did this before, but I’m going to give you a specific process so that is happens the way it should.

    First, though, please open your database in phpMyAdmin and take a look at the data in the wp_participants_database table. Check the “private_id” column and tell me what you see.

    A separate point: don’t use iframes in emails, a lot of email clients won’t render them and they are considered a security risk, so you will have delivery issues. If you are not using iframes in your outgoing email templates, it makes me wonder why you’re seeing that in the email…this is absolutely not something the plugin is doing, so my guess is that there is some other plugin on your site that is altering the emails. The content of the emails does go through the “the_content” filter, which is accessible to other plugins, so this is a real possibility. You should figure out what is happening there and fix it.

    Thread Starter Julie Lawrence

    (@julie-lawrence)

    Thank you SO much … I’m amazed by your willingness to support!!!

    The private_id column is a series of 5 character strings, consisting of uppercase letters and numbers, as generated by SET private_id = UPPER(SUBSTR(MD5(RAND()), 1, 5))

    Thanks for the iframes hint – I’ll track that down!!

    Looking forward to the next steps – thank you!!!!

    Thread Starter Julie Lawrence

    (@julie-lawrence)

    I finally tracked down the source of the iframe – it was coming from _oembed_filter_feed_content, which is used by the_content() – thanks for that hint!

    In the PD settings, Advanced tab, I’ve set Use WordPress Auto Formatting to “none”, and it’s working now!!

    My site is still crashing when I enable the Email plugin, with errors like this in the log:

    Cannot modify header information - headers already sent
    in /home/mtneboor/public_html/wp-content/plugins/participants-database/classes/PDb_Session.php on line 377
    Thread Starter Julie Lawrence

    (@julie-lawrence)

    >> RPNE2 is the private ID of the former “default record” the plugin used originally, and its use was phased out years ago, so seeing that surface is puzzling.

    It happened when I exported and then re-imported my list, if that helps.

    Plugin Author xnau webdesign

    (@xnau)

    About the problems with the email plugin, the message you saw in the log is not the source of the problem, that is not a critical error.

    Ususally, when there is a problem like that on your site, you’ll get a “there was a critical error on your site” message and an email is sent to the administrator with details about the problme. The information in that email will be critical to solving the problem.

    If your database does not conatin the “RPNE2” value in the private_id column, then it is probably fine.

    Thread Starter Julie Lawrence

    (@julie-lawrence)

    >> an email is sent to the administrator

    Oddly, no email is sent!! And there’s nothing in the error logs. I’m still able to access the WP back end, the error is only on the front end. I get the site back up by disabling the PD Email plugin.

    >> I would suggest you rebuild the database, and I know you did this before, but I’m going to give you a specific process so that is happens the way it should.

    That would be awesome, please!!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[record_link] not working’ is closed to new replies.