[VIEWBROWSERURL] not parsed on URL content

Was not sure if posting here or in the github repository.

We have an issue with the view in browser plugin whereas the arrived email does not parse the value of the URL variable and maintains the placeholder.

The only similar issue I found was https://github.com/bramley/phplist-plugin-viewbrowser/issues/2 but I have tried with or without “anonymous” page setup with the same result.

The test email on the newsletter editor arrives correctly, but when sent arrives to the user likes this:

   <div style="font-family:Fira Sans,Helvetica,Arial,Verdana,Trebuchet
    MS;font-size:13px;line-height:1;text-align:right;color:#000"><a href="[VIEWBROWSERURL]" style="color:#477626" moz-do-not-send="true">Ver en el navegador</a></div>

Also checked the user has a proper UUID.

Installed are latest versions and latest plugin version too. Not sure what else to test or how to debug further.

@luison Copying your chunk of HTML into a campaign body or a template works for me. The placeholder is replaced.
image

Can you show the complete message body or template. What other plugins have you installed?

Thanks @duncanc
I understand this is the relevant part (it is another test)
Plugins? Active:
CKEditorPlugin, CommonPlugin (3.11.2), domainthrottlemap, inviteplugin, restapi. SegmentPlugin, ViewBrowserPlugin

Date: Mon, 18 May 2020 15:10:12 +0000
To: luison+test@gmail.com
From: "joseluis@alsur.es" <joseluis@alsur.es>
Subject: PRUEBA [VIEWBROWSERURL]
Message-ID: <010201722855d297-a9ae080f-1986-45bc-8ba9-fc3a6ac86175-000000@eu-west-1.amazonses.com>
X-phpList-version: 3.5.3
X-MessageID: 523
X-ListMember: luison+test@gmail.com
Precedence: bulk
List-Help: <https://listas.golfinspain.com/?p=preferences&uid=b9051fa9bbd42220e73431f68c7810cc>
List-Unsubscribe: <https://listas.golfinspain.com/?p=unsubscribe&uid=b9051fa9bbd42220e73431f68c7810cc&jo=1>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
List-Subscribe: <https://listas.golfinspain.com/?p=subscribe>
List-Owner: <mailto:privacy@elsurexiste.es>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="b1_6146b4521fa943942e933ecdb032632d"
X-SES-Outgoing: 2020.05.18-54.240.7.34
Feedback-ID: 1.eu-west-1.coZC3jiw13TdswVH8D3oIqOD8nzhAbyHy8/AMiOc6mA=:AmazonSES

This is a multi-part message in MIME format.

--b1_6146b4521fa943942e933ecdb032632d
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



internet se encuentra alsur

 <http://listas.golfinspain.com/lt.php?tid=3DunJ3k3JdJ2ar6yE8olKOcWyV4FNShu=
6xsDuSjGd4sTOZzuzkqwYrTZhuUeDiXy9n>

 email: luison+test@gmail.com

 prefs url:=0Ahttp://listas.golfinspain.com/lt.php?tid=3DwoGP4Upr6uSZQCPDGF=
QuzGyV4FNShm6xsDuSjGd4sTOZzuzkqwbLTZhuUeDiXy9n

 view in browser: [VIEWBROWSERURL]

 userID: b9051fa9bbd42220e73431f68c7810cc



-


-- powered by phpList, www.phplist.com --



--b1_6146b4521fa943942e933ecdb032632d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.=
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />
<title>internet se encuentra alsur</title>
<style type=3D"text/css">
body,td,th { font-family: Georgia, "Times New Roman", Times, serif; color: =
#405F64; }
body { background-color: #FFF; background-repeat: no-repeat; }
html, body, #wrapper {
   height:100%;
   width: 100%;
   margin: 0;
   padding: 0;
   border: 0;
}
#wrapper td {
   vertical-align: middle;
   text-align: center;
}
</style>
</head>

<body style=3D"text-align:center; vertical-align:text-top">
   <table id=3D"wrapper">
  <tr>
     <td><p><a href=3D"http://listas.golfinspain.com/lt.php?tid=3DKk4AB=
QIKBw4JBhpTUAJdT1BUDwZJAFEGWxRWCFAHAgJXAFoBAglMD1MMAgFSAgpPUVEBBklVVgEIFAYJ=
UAZOCVAKAVICDwhbAQYEGFsOWgcBAFwESQBRUw8UUFtXAE4JWgQHSQAJVQlVBwICUFEPVQ" ><i=
mg src=3D"http://st.alsur.es/ima/bcgsm_03.gif" alt=3D"alsur marketing turis=
tico y golf" border=3D"0" /></a></p>
     <p>email: luison+test@gmail.com</p>
     <p>prefs url: https://listas.golfinspain.com/?p=3Dpreferences&amp;=
uid=3Db9051fa9bbd42220e73431f68c7810cc</p>
     <p>view in browser: [VIEWBROWSERURL]</p>
     <p>userID: b9051fa9bbd42220e73431f68c7810cc</p>
     </td>
  </tr>
   </table>
<br />-=0A<div style=3D"clear: both; font-family: arial, verdana, sans-seri=
f; font-size: 8px; font-variant: small-caps; font-weight: normal; padding: =
2px; padding-left:10px;padding-top:20px;">powered by <a href=3D"http://list=
as.golfinspain.com/lt.php?tid=3DKk5aXVBbBA5VARpXA1FbT1BXWghJAFICCxRdWFZSBlU=
BV1tRBgBMD1MMAgFSAgpPUVEBBklVVgEIFAYJUAZOCVAKAVICDwhbAQYEGFsOWgcBAFwESQBRUw=
8UUFtXAE4JWgQHSQAJVQlVBwICUFEPVQ"  target=3D"_blank" title=3D"powered by ph=
pList version 3.5.3, &copy; phpList ltd">phpList</a></div><img src=3D"http:=
//listas.golfinspain.com/ut.php?u=3Db9051fa9bbd42220e73431f68c7810cc&amp;m=
=3D523" width=3D"1" height=3D"1" border=3D"0" alt=3D"" /></body>
</html>

Updated the commonplugin to latest, issue remains.

@luison Have you enabled the plugin on the Manage Plugins page?

Yes obviously. As I mentioned it works on the test delivery and there are settings available.

@luison Ah yes, you did say.
Please show the source of the message in phplist. If you are using the editor then show the html using the Source toolbar button.

Is this the firs time that you have tried using the plugin, or was it working before but now is not?
How do you process the queue - a cron job or through the browser?

Hi again
Bellow is the test source code we are using as URL as this is the case we have the issue. Have also tried including the HTML in the editor. Same result.
We had issues before but thought they were related to having separate languages, subscription pages.
We use a cron to execute the queue.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>internet se encuentra alsur</title>

<style type="text/css">

body,td,th { font-family: Georgia, "Times New Roman", Times, serif; color: #405F64; }

body { background-color: #FFF; background-repeat: no-repeat; }

html, body, #wrapper {

   height:100%;

   width: 100%;

   margin: 0;

   padding: 0;

   border: 0;

}

#wrapper td {

   vertical-align: middle;

   text-align: center;

}

</style>

</head>

<body style="text-align:center; vertical-align:text-top">

   <table id="wrapper">

      <tr>

         <td><p><a href="http://alsur.es"><img src="http://st.alsur.es/ima/bcgsm_03.gif" alt="alsur marketing turistico y golf" border="0" /></a></p>

         <p>email: [EMAIL]</p>

         <p>prefs url: [PREFERENCESURL]</p>

         <p>view in browser: [VIEWBROWSERURL]</p>

         <p>userID: [USERID]</p>

         </td>

      </tr>

   </table>

</body>

</html>

@luison Thanks. I am guessing that when you run a cron job it uses a different version/configuration of php than the web server, which causes the plugin to not be enabled. Possibly the xsl extension is not present in the php configuration.
If you are able to run this from a command line or as a cron job to capture the php configuration
php -i > phpconfig.txt

Can you try sending a campaign with processing the queue through the browser to see whether that is any different?

1 Like

That was the issue thanks. Works with except the [USERID] which shows correctly on the email but not on the linked browser version. That might likely be intentioned behaviour.

xsl module was loaded in PHP but the cron was going via a bash script that was executing a different version of PHP which likely did not have it. I should have deduced it from it working on the test version but not the cron. Sorry.

Thanks for your help.

@luison I think that using USERID may be historical. Some of the phplist documentation now refers to UNIQID. They refer to the same value, the 32 character string in the uniqid column of the user table.