Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#385 2023-01-16 18:22:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: com_connect - form and contact mailer

whocarez wrote #334519:

sanitizeForUrl makes everything lowercase… REMOTE_ADDR gets remote_addr.

D’oh. Rookie mistake. Thank you for sleuthing it. This will be patched.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#386 2023-02-28 15:03:20

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

Re: com_connect - form and contact mailer

Hi you all, I could use some help. I have a form that sends an email, but when I reply to sender, the email address is incorrect. It takes everything in front of the @ and adds my own domain to form the email address.

For example: the sender is johndoe@senderdomain.com
When I reply the following email address appears: johndoe@mydomain.com

Am I overlooking something?
Sharon

Offline

#387 2023-03-10 03:04:18

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

Re: com_connect - form and contact mailer

Strange Address in ‘From’

These days the messages that I receive via the com_connect plugin use this address format in ‘From’:

com_connect <sample@sample.com X-Mailer: Textpattern X-Originating-IP: 60.47.18.233 Content-Transfer-Encoding: 8bit Content-Type: text/plain charset="UTF-8">

Previously it showed only the sender’s email address (sample@sample.com).

Is this the result of a setting on my hosting service, or is this a feature of com_connect?

I am using com_connect 4.6.0 with Textpattern 4.8.7.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#388 2023-03-10 05:56:51

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: com_connect - form and contact mailer

That sounds like the same issue

What is the PHP version in use?

Upgrading to com_connect 4.7 might help.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#389 2023-03-10 07:26:55

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

Re: com_connect - form and contact mailer

phiw13 wrote #334997:

That sounds like the same issue

What is the PHP version in use?

Upgrading to com_connect 4.7 might help.

Thanks. Yes that looks like the same issue.

I am using PHP version 8.0.

Just upgraded to com_connect 4.7, but still have the same issue.

Last edited by Kjeld (2023-03-10 07:31:43)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#390 2023-03-10 08:21:06

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: com_connect - form and contact mailer

Kjeld wrote #335000:

Just upgraded to com_connect 4.7, but still have the same issue.

Strange. This issue is marked fixed for 4.7 – if I read Github correctly.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#391 2023-03-10 09:00:51

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

Re: com_connect - form and contact mailer

phiw13 wrote #335001:

Strange. This issue is marked fixed for 4.7 – if I read Github correctly.

Weird…


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#392 2023-03-10 12:09:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: com_connect - form and contact mailer

peterj wrote #334026:

I’m getting a tag error with com_connect 4.7.0 on TXP4.8.8 and PHP8.1. When using com_connect as self-closing (using as a container is fine). 8.1 doesn’t like NULL much. <txp:com_connect to="meme.com” /> -> 8192: preg_replace():…@

Finally looking at this. Totally bizarre. $thing is set to empty '' in the plugin function signature but the instant it is invoked, even on the first line inside the plugin tag, it becomes null.

There must be something outside the scope of the plugin itself to do with the way we load them or invoke tags when there’s no container content.

Not sure whether to see what we can do about fixing that in core, or just casting the value to string internally within the plugin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#393 2023-03-10 12:35:43

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: com_connect - form and contact mailer

Bloke wrote #335005:

Finally looking at this. Totally bizarre. $thing is set to empty '' in the plugin function signature but the instant it is invoked, even on the first line inside the plugin tag, it becomes null.

That’s right, and it has always been like this, afair. All core tags have the default $thing = null, which is actually a formal argument, since $thing is always passed to plugins functions by processTags(). And for contentless tags, the parser sets $thing = null.

Is it a bug? Maybe, but it’s not evident to fix in core now (unless we switch to php8), since some tags functions have extra positional arguments after $thing.

Offline

#394 2023-03-10 12:57:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: com_connect - form and contact mailer

Hmm, yeah. It’s only an issue if one tries to use $thing directly in a plugin without checking first if it’s null. I never noticed before because nearly all my plugins have had $thing=null in their signature until PHP 8 appeared and threw a spanner in.

What’s potentially confusing is that if the plugin explicitly states the default situation is to be '' in its function signature, that might not actually be the case when the tag is used.

Is there no way to alter the tag processor to retain the positional significance of $thing and anything that comes after it, but instead of defaulting to null, it defaults to ''? I guess that might have unintended consequences through the codebase so wouldn’t want to change it unless we’re sure it isn’t going to cause issues.

Last edited by Bloke (2023-03-10 13:01:46)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#395 2023-03-10 12:58:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: com_connect - form and contact mailer

I have no problem casting it to string in the plugin now I know what’s causing the issue, btw. But this behaviour should be documented in the development resources where appropriate to help other plugin authors.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#396 2023-03-10 13:02:12

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: com_connect - form and contact mailer

Bloke wrote #335008:

Is there no way to alter the tag processor to retain the positional significance of $thing and anything that comes after it, but instead of defaulting to null, it defaults to ''? I guess that might have unintended consequences through the codebase.

Absolutely no way :-) Many tags need to know whether they are called with content (even empty) or not. What we could do rather easily, is not passing null $thing at all, but only if the tag has no extra (registered) arguments.

Offline

Board footer

Powered by FluxBB