SMTP Port field missing Topic is solved

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
ernienet
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Fri Oct 20, 2006 5:32 am

SMTP Port field missing

Post by ernienet » Thu May 26, 2022 3:11 am

I manage two-dozen Joomla 3.10.9 websites and I just came across this scenario:

I moved hosting in January to DirectAdmin because it would save me money on hosting (cPanel was a lot more expensive).

It had different requirements for setting up email, so I've had to fix every website to use SMTP with port 587 and use Authentication with an STMP User and SMTP Password.

I came across a site today that has no field for SMTP Port (see attached image)
Capture.JPG
I cannot figure out why this is the case for this one Joomla website. All the websites are for a small niche of a chapter-based organization, so they're pretty much identical in the extensions I use across them all, and all are on the same hosting. Joomla and extensions are updated through MySites.guru, for the most part, so everything is always current.

Any thoughts?

Thank you,
Ernie
You do not have the required permissions to view the files attached to this post.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 14702
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: SMTP Port field missing

Post by toivo » Thu May 26, 2022 3:35 am

Check the file configuration.php in the main Joomla folder. Is the variable $smtpport still there?

Write enable the file configuration.php and edit or add the following line:

Code: Select all

	public $smtpport = '587';
Check also the other entries in Global Configuration, in case something else has also changed.
Toivo Talikka, Global Moderator

ernienet
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Fri Oct 20, 2006 5:32 am

Re: SMTP Port field missing

Post by ernienet » Thu May 26, 2022 3:40 am

It's present and set to:

public $smtpport = '25';

Why would it be set to a fixed number and not be editable? And why would it be different on this site than the others?

Should I change it to 587 or is there a setting that will restore the blank so I can fill it in manually?

Thank you,
Ernie

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 12066
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: SMTP Port field missing

Post by sozzled » Thu May 26, 2022 3:52 am

@ernienet: I agree that @toivo's suggestion—as a workaround—may be promising but I also agree that the way your Global Configuration screen presents is not right. I would only be guessing as to the cause of why the SMTP Port field is not displayed as an editable field.

I did a quick check on Google to see when this issue was last reported (and you'd have to go back over a decade to find any) and, in that case, it had something to so with a [long-dead version of J! and a long-dead] plugin. I don't suspect that's the reason in your case.

This is what you've told us:

(a) the issue occurs only on one website; and
(b) you rely on a third-party service to perform your software updates.

My guess is that the update that was applied to this one website wasn't 100% successful. Therefore, have you considered using the Joomla! Update component in your backend, click Check for Updates and then click Reinstall Joomla core files ... to see if it overcomes the problem you're having? That's the first thing I'd try.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

ernienet
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Fri Oct 20, 2006 5:32 am

Re: SMTP Port field missing

Post by ernienet » Thu May 26, 2022 4:08 am

@sozzled

The website indeed does go back to Joomla 1.5... maybe even to 1.0 - a lot of my older sites have been upgraded through the years and were not originally 3.x sites.

I ran the update again, but it didn't change the missing field.

Thank you,
Ernie

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 14702
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: SMTP Port field missing

Post by toivo » Thu May 26, 2022 4:09 am

ernienet wrote:
Thu May 26, 2022 3:40 am
Why would it be set to a fixed number and not be editable?
It sounds like the file configuration.php is write protected. You need remove the write protection before you can edit that file. Joomla does it automatically when you go to Global Configuration from the back end and then Joomla write protects that file.
Toivo Talikka, Global Moderator

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 12066
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: SMTP Port field missing

Post by sozzled » Thu May 26, 2022 4:19 am

ernienet wrote:
Thu May 26, 2022 4:08 am
The website indeed does go back to Joomla 1.5... maybe even to 1.0 - a lot of my older sites have been upgraded through the years and were not originally 3.x sites.

I ran the update again, but it didn't change the missing field.
OK. It was just a guess. You haven't given me any reason to suspect that there's an extension in use in this particular website that's not used in your other websites that may be the cause of the problem. In any case, what's happened on this website is not the norm and it might be an idea to audit what software you're using and whether you really need it.

As @toivo wrote—and you probably knew this already—you may not be able to manually edit the file configuration.php if it's set to read-only. However, you should be able to display the contents of the SMTP Port field in the browser unless there's something broken. Something's broken —or interfering with the ability to display that field—and I don't know what it may be.

BTW—completely out of left field)—are you using (or have you ever used) Community Builder software with this site?
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

ernienet
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Fri Oct 20, 2006 5:32 am

Re: SMTP Port field missing

Post by ernienet » Thu May 26, 2022 4:27 am

I was able to edit the configuration.php file without issue - I changed the setting and the emails send successfully now. But the field is still just as the screenshot showed - no blank next to the field name.

Every other field is editable, so I don't think there's any write protection involved - why would it only protect one field?

This is an oddball site. Several years ago I tried to install Akeeba Admin Tools and it wreaked havoc on the site - even though it worked fine on all the other sites where I installed it.

When all the extensions are updated to support Joomla 4.x, I'll hopefully get rid of all these issues in the process of migrating - THIS time!

Thank you,
Ernie

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 12066
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: SMTP Port field missing

Post by sozzled » Thu May 26, 2022 4:37 am

ernienet wrote:
Thu May 26, 2022 4:27 am
I was able to edit the configuration.php file without issue - I changed the setting and the emails send successfully now. But the field is still just as the screenshot showed - [nothing] next to the field name.

Every other field is editable, so I don't think there's any write protection involved - why would it only protect one field?
No, there's nothing I'm aware of that affects why this one field is not displaying. It's not a case of the field being protected; it's a case of the XML file used by com_config that instructs the CMS whether or not to display (a) the field name, (b) the field value and (c) how to format these pieces of information.

ernienet wrote:
Thu May 26, 2022 4:27 am
When all the extensions are updated to support Joomla 4.x, I'll hopefully get rid of all these issues in the process of migrating - THIS time!
Good luck with that! I suspect you'll be in store for an added load of "issues" (without knowing what extensions you're using, whether the developer(s) of those extensions have any plans to make them compatible with J! 4.x or the latest versions of PHP, etc.). "Hopefully" is a word I read too often and is often followed by disillusion, disappointment, frustration and a sense of abandonment. Hopefully, your hope will be rewarded. ;)
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

ernienet
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Fri Oct 20, 2006 5:32 am

Re: SMTP Port field missing

Post by ernienet » Thu May 26, 2022 4:51 am

The only holdout is DT Register, by JoomlArt. No idea when they'll get that compatible with J4 - Community Builder, all the Akeeba products, and PWT ACL were J4 ready a long time ago.

I started to work through the active clients (a lot of them went dormant for two years due to Covid) in the MySites.guru audit process and deleting any extensions I've been able to identify as old stuff that was no longer needed - Akeeba guided me on a lot of old FOF SQL files that should have been deleted a long time ago. I want the sites to be as clean as possible before I start migrating.

The Joomla forums definitely DON'T leave me with a sense of abandonment - there are always people here to help, and I really appreciate it.

Thank you,
Ernie

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 12066
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: SMTP Port field missing

Post by sozzled » Thu May 26, 2022 5:01 am

Cheers, mate. 8)

Even though the issue—the non-display of the SMTP Port information in Global Configuration—has not been resolved (and I still believe that you may be able to fix it), you've got a temporary workaround that'll get you by.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41576
Joined: Sat Apr 05, 2008 9:58 pm

Re: SMTP Port field missing

Post by Webdongle » Thu May 26, 2022 7:39 am

Have you tried 'Reinstall core files' in the Joomla update component?
What Admin Template are you using?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

ernienet
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Fri Oct 20, 2006 5:32 am

Re: SMTP Port field missing

Post by ernienet » Thu May 26, 2022 8:54 am

Webdongle wrote:
Thu May 26, 2022 7:39 am
Have you tried 'Reinstall core files' in the Joomla update component?
What Admin Template are you using?
Yes, tried that earlier.
sozzled wrote:
Thu May 26, 2022 5:01 am
Cheers, mate. 8)

Even though the issue—the non-display of the SMTP Port information in Global Configuration—has not been resolved (and I still believe that you may be able to fix it), you've got a temporary workaround that'll get you by.
Agreed - I don't like it either, but getting it to work was the priority because the client has an active event where a confirmation email is sent. As soon as it can be resolved, I will certainly do it. Who knows what other functionality is affected - it may point to some other issue as well.

Thank you,
Ernie

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41576
Joined: Sat Apr 05, 2008 9:58 pm

Re: SMTP Port field missing

Post by Webdongle » Thu May 26, 2022 12:08 pm

Do you have an override in your Admin Template that displays the Global configuration

/administrator/components/com_config/model/form/aplication.xml contains
<field
name="smtpport"
type="text"
default="25"
showon="mailer:smtp"
label="COM_CONFIG_FIELD_MAIL_SMTP_PORT_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_PORT_DESC"
required="true"
filter="string"
size="6" />
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

ernienet
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Fri Oct 20, 2006 5:32 am

Re: SMTP Port field missing

Post by ernienet » Thu May 26, 2022 1:04 pm

Webdongle wrote:
Thu May 26, 2022 12:08 pm
Do you have an override in your Admin Template that displays the Global configuration

/administrator/components/com_config/model/form/aplication.xml contains
<field
name="smtpport"
type="text"
default="25"
showon="mailer:smtp"
label="COM_CONFIG_FIELD_MAIL_SMTP_PORT_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_PORT_DESC"
required="true"
filter="string"
size="6" />
Yes, but mine's a little different:

<field
name="smtpport"
type="number"
label="COM_CONFIG_FIELD_MAIL_SMTP_PORT_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_PORT_DESC"
showon="mailonline:1[AND]mailer:smtp"
min="1"
max="65535"
default="25"
hint="25"
validate="number"
filter="integer"
size="5"
/>

Which one is correct?

Thank you,
Ernie

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 14702
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: SMTP Port field missing

Post by toivo » Thu May 26, 2022 1:19 pm

@Ernie, your version is correct in Joomla 3.10.9.
Toivo Talikka, Global Moderator

User avatar
PhilTaylor-Prazgod
Joomla! Ace
Joomla! Ace
Posts: 1291
Joined: Sat Aug 20, 2005 12:32 pm
Location: Jersey, Channel Islands
Contact:

Re: SMTP Port field missing

Post by PhilTaylor-Prazgod » Thu May 26, 2022 1:26 pm

Is there a javascript error on the page - check the dev tools console? Can you navigate to other tabs on the page?

The mentioning of a service that performs updates is irrelevant to the issue - but set off my radar.
Phil Taylor
Founder, Lead Developer, Idiot.
- https://mySites.guru - Manage Multiple Joomla/WordPress Sites In One Dashboard for Security, Audits, Backups and more....
- https://www.phil-taylor.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41576
Joined: Sat Apr 05, 2008 9:58 pm

Re: SMTP Port field missing

Post by Webdongle » Thu May 26, 2022 2:07 pm

Mine was from an older version. But I posted it as a starting point. Not sure how the page renders but was hoping someone would jump in and track the process to find what is preventing the page rendering correctly.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".


Post Reply

Return to “Administration Joomla! 3.x”