Advertisement

JED Checker Topic is solved

Here you can contact the editors of our Extensions site, as well as access infomation relating to this site.

Moderator: JED Team

Forum rules
Forum Rules
READ ME <-- please read before posting, this means YOU.
Post Reply
rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

JED Checker

Post by rgtr » Sat Jan 04, 2025 3:56 pm

Hi

Ran my revised Google Maps plugin through the JED Checker - should not have bothered.

Guess what No 1
Code: defined( '_JEXEC' ) or die; [a space each end inside the brackets]
JED: php files missing JEXEC security.
Please explain

Guess what No 2
JED states
#001 /language/en-GB/plg_content_tdocgmap.ini
Incorrect end-of-line character found. Convert file to Unix EOL (\n) format.
#002 /language/en-GB/plg_content_tdocgmap.sys.ini
Incorrect end-of-line character found. Convert file to Unix EOL (\n) format.

I use notepad in Windows 11 Pro Ver 24H2, Joomla reads the ini files just fine.

And now we have a new naming convention - keep it to the committee.

So I guess some knobby headed nutter will block the community from using my plugin.

Frankly who cares ? It has a very desirable feature; It WORKS.

Richard

Advertisement
User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: JED Checker

Post by ceford » Sat Jan 04, 2025 6:30 pm

I think you are being unkind to the community. I use the JED Checker to look for problems in my extensions even though I do not publish extensions in the JED.

May I suggest you try out VSCode? It is free and takes a few minutes to install and a little longer to learn.

The Joomla coding standard was changed a while back so Joomla code should now comply with PSR12. The _JEXEC statement should look like this:

Code: Select all

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: JED Checker

Post by rgtr » Sat Jan 04, 2025 6:40 pm

ceford

Thanks

I had a bad year with numpties - see tdocplus.co.uk/01_ROPA - won in the end.

Will update as you suggest.

R

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Sat Apr 14, 2007 9:16 am
Location: Armenia
Contact:

Re: JED Checker

Post by Physicist » Sun Jan 05, 2025 7:50 am

> Code: defined( '_JEXEC' ) or die; [a space each end inside the brackets]

Could you show the entire preamble? The _JEXEC check must be the first executable code in the file; only declare, namespace, and use statements are permitted before it.

> Incorrect end-of-line character found. Convert file to Unix EOL (\n) format.

Of course, Joomla can load language files in any EOL format. But it’s better to use a unified standard since you’re creating language files not for yourself, but for translators who will translate them into their language. You don’t know what programs, online services, or hastily written scripts they might use.
Denis Ryabov, JED Checker Developer, Page Speed Optimizer Developer, Mobile Developer.

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: JED Checker

Post by rgtr » Sun Jan 05, 2025 9:33 am

Physicist

here is the code at the start - including my documentation notes:

// Ver 5.5.0 per Robbie added new line
namespace Tdoc\Plugin\Content\Tdocgmap\Extension;

use Joomla\CMS\Plugin\CMSPlugin;

// Ver 5.5.0 per Robbie added two new lines
use Joomla\Event\Event;
use Joomla\Event\SubscriberInterface;

defined( '_JEXEC' ) or die;

// Ver 5.5.0 per Robbie amended line
class Tdocgmap extends CMSPlugin implements SubscriberInterface {

So you can see that there are three use statements, and one namespace statement before the JEXEC.

Thanks for the comment about others using the ini files. The format I have is usually UTF-8, but here we go again with Microshaft, it has saved everything I have edited as UTF-8 with BOM without asking.
Much as it removed WordPad without a by-your-leave, and when I restored it to its usual place, just got on and removed it again . . . politics politics and dictatorship. WordPad can only be restored outwith the various Program Files directories.

Richard

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Sat Apr 14, 2007 9:16 am
Location: Armenia
Contact:

Re: JED Checker

Post by Physicist » Sun Jan 05, 2025 10:26 am

I've checked the code (the only thing I added is <?php before the code), and it's detected correctly.
Could you send me the entire file to [email protected]?
Denis Ryabov, JED Checker Developer, Page Speed Optimizer Developer, Mobile Developer.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31522
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: JED Checker

Post by Per Yngve Berg » Sun Jan 05, 2025 10:50 am

rgtr wrote: Sat Jan 04, 2025 3:56 pmI use notepad in Windows 11 Pro Ver 24H2, Joomla reads the ini files just fine.
Windows is the problem here. It enters CR LF as EOL instead of LF only.

Mod. Note: Relocating the Topic to the JED Feedback Forum. The Extensions Forum is for End Users, not Developers.

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: JED Checker

Post by rgtr » Sun Jan 05, 2025 12:16 pm

Per
Thanks
R

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: JED Checker

Post by rgtr » Fri Jan 10, 2025 6:01 pm

Hi
First I found the problem with a missing JEXEC.
It has to be in provider.php as well.
Second, I have saved the two language files as utf-8 and notepad says lines end with CRLF.
The other options in Win 11 Pro are Ansi, UTF-16le and BE
I am none the wiser ! Guess we are Microshafted ! Win 11 Pro's Notepad has none of the options suggested in the various blogs.
Richard

gws
Joomla! Champion
Joomla! Champion
Posts: 6536
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: JED Checker

Post by gws » Fri Jan 10, 2025 6:40 pm

Try Notepad ++

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: JED Checker

Post by rgtr » Fri Jan 10, 2025 9:08 pm

gws
just discovered it
will be trying ++ tomorrow
looks like i will want to use both!
BUT notepad is very good for making notes !
r

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: JED Checker

Post by rgtr » Sat Jan 11, 2025 11:35 am

Hi
I have been using JEDIT for several years for managing .kml files which are the essence of my plugin to display them.
It has a setting, for each file, to set the eol character.
Problem solved.
Richard

Advertisement

Post Reply

Return to “extensions.joomla.org - Feedback/Information”