No Code Attached Yet PBF bug
avatar dereksca
dereksca
27 Jun 2023

Steps to reproduce the issue

  1. Go to System -> Global Configuration -> Site in the back-end
  2. Put in any string of text that includes @ and | in the Site Name Field
  3. Go to the Server tab and click Send Test Mail with the PHP Mail set as the Mailer

Expected result

A test mail should be sent to the admin e-mail

Actual result

Mail does not get sent, instead the error
An error has occurred while fetching the JSON data: HTTP 101 status code. Switching Protocols
appears.

System information (as much as possible)

php: Linux lamp8.cloudaccess.net 3.10.0-962.3.2.lve1.5.24.4.el6h.x86_64 #1 SMP Thu Nov 15 04:53:17 EST 2018 x86_64
dbserver: mysql
dbversion: 5.7.35-cll-lve
dbcollation: utf8_general_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 8.0.29
server: Apache
sapi_name: cgi-fcgi
version: Joomla! 4.3.2 Stable [ Bora ] 30-May-2023 16:00 GMT
useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0

=============
PHP Settings

memory_limit: 512M
upload_max_filesize: 360M
post_max_size: 380M
display_errors: true
short_open_tag: true
file_uploads: true
output_buffering: false
open_basedir:
session.save_path: xxxxxx
session.auto_start: 0
disable_functions: socket_create,socket_connect,show_source,enable_dl,dl,memory_limit,socket_accept,socket_bind,socket_close,socket_create_listen,socket_create_pair,socket_listen,socket_recv,socket_recvfrom,socket_select,socket_send,socket_sendto,socket_shutdown
xml: true
zlib: true
zip: true
mbstring: true
fileinfo: true
gd: true
iconv: true
intl: true
max_input_vars: 10000

Additional comments

avatar dereksca dereksca - open - 27 Jun 2023
avatar dereksca dereksca - change - 27 Jun 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Jun 2023
avatar alikon
alikon - comment - 28 Jun 2023

i'm unable to reproduce

image

avatar dereksca
dereksca - comment - 28 Jun 2023

The @ and | characters need to be under System -> Global Configuration -> Site -> Site Name, not in the address

avatar chmst
chmst - comment - 28 Jun 2023

Cannot replicate, PHP 8.1.8.

avatar brianteeman
brianteeman - comment - 28 Jun 2023

Confirmed - testers - when ou change the site name don't forget to save global config before sending the test mail

image

avatar alikon
alikon - comment - 28 Jun 2023

my bad i've only changed the email

avatar chmst
chmst - comment - 28 Jun 2023

grafik
Used this test - but seems to be another configuration

BUT I get the error with smtpmail. @dereksca was it with PHP Mail when you got the error?

avatar Quy Quy - change - 28 Jun 2023
Labels Added: bug
avatar Quy Quy - labeled - 28 Jun 2023
avatar alikon
alikon - comment - 28 Jun 2023

so change the sitename to pattern something like j43@admin@test|test.com

save

still unable to reproduce

image

but with a correct email

image

?

avatar dereksca
dereksca - comment - 28 Jun 2023

@chmst @alikon - the issue is on Joomla 4

avatar alikon
alikon - comment - 28 Jun 2023

i know that, as you correctly wrote @dereksca

version: Joomla! 4.3.2 Stable [ Bora ] 30-May-2023 16:00 GMT

just unable to replicate ?

avatar chmst
chmst - comment - 28 Jun 2023

@alikon I got the error with smtpmail, not with PHP Mail.

avatar alikon
alikon - comment - 28 Jun 2023

@chmst
on my setup it still works
image

?

avatar alikon
alikon - comment - 28 Jun 2023

image

avatar quangnt-cloudaccess
quangnt-cloudaccess - comment - 5 Jul 2023

@alikon m @chmst ,

  1. As I know, Joomla is using XML file for fields. For example: "Site Name" field is at Joomla_4.3.2-Stable-Full_Package/administrator/components/com_config/forms/application.xml

https://docs.joomla.org/text_form_field_type

Screenshot from 2023-07-03 22-54-34

  1. How to use special characters in XML
    https://www.dvteclipse.com/documentation/svlinter/How_to_use_special_characters_in_XML.3F.html

In theory, because XML syntax uses some characters for tags and attributes. It is not possible to directly use those special characters inside XML tags or attribute values.

To include special characters inside XML files, you must use the numeric character reference instead of that character. The numeric character reference must be UTF-8 because the supported encoding for XML files is defined in the prolog as encoding="UTF-8" and should not be changed.

For example:
&#124 is Vertical bar, displayed as |
&#64 is At, displayed as @

  1. So to avoid misunderstanding for users, you can give some instructions as you did for "Toggle Inline Help" button. Because some cases, for example, xxx@xxx|xxx (a pair @ and |), by accident, XML file can not parse correctly as expected
avatar Hackwar Hackwar - change - 25 Aug 2023
Labels Added: PBF
avatar Hackwar Hackwar - labeled - 25 Aug 2023
avatar richard67 richard67 - close - 26 Aug 2023
avatar richard67
richard67 - comment - 26 Aug 2023

Closing as having a pull request. See #41469 .

avatar richard67 richard67 - change - 26 Aug 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-08-26 21:07:19
Closed_By richard67

Add a Comment

Login with GitHub to post a comment