Advertisement
JED Checker Topic is solved
Moderator: JED Team
-
- Joomla! Explorer
- Posts: 260
- Joined: Tue Sep 01, 2009 11:31 am
- Location: Glasgow
- Contact:
JED Checker
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
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
- ceford
- Joomla! Hero
- Posts: 2967
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: JED Checker
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:
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
-
- Joomla! Explorer
- Posts: 260
- Joined: Tue Sep 01, 2009 11:31 am
- Location: Glasgow
- Contact:
Re: JED Checker
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
Thanks
I had a bad year with numpties - see tdocplus.co.uk/01_ROPA - won in the end.
Will update as you suggest.
R
-
- Joomla! Enthusiast
- Posts: 133
- Joined: Sat Apr 14, 2007 9:16 am
- Location: Armenia
- Contact:
Re: JED Checker
> 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.
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.
-
- Joomla! Explorer
- Posts: 260
- Joined: Tue Sep 01, 2009 11:31 am
- Location: Glasgow
- Contact:
Re: JED Checker
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
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
-
- Joomla! Enthusiast
- Posts: 133
- Joined: Sat Apr 14, 2007 9:16 am
- Location: Armenia
- Contact:
Re: JED Checker
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]?
Could you send me the entire file to [email protected]?
- Per Yngve Berg
- Joomla! Master
- Posts: 31522
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: JED Checker
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.
-
- Joomla! Explorer
- Posts: 260
- Joined: Tue Sep 01, 2009 11:31 am
- Location: Glasgow
- Contact:
Re: JED Checker
Per
Thanks
R
Thanks
R
-
- Joomla! Explorer
- Posts: 260
- Joined: Tue Sep 01, 2009 11:31 am
- Location: Glasgow
- Contact:
Re: JED Checker
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
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
-
- Joomla! Champion
- Posts: 6536
- Joined: Tue Aug 23, 2005 1:56 pm
- Location: South coast, UK
- Contact:
Re: JED Checker
Try Notepad ++
https://gadsolutions.biz Electrical services
https://electrical-testing-safety.co.uk Testing services
https://electrical-testing-safety.co.uk Testing services
-
- Joomla! Explorer
- Posts: 260
- Joined: Tue Sep 01, 2009 11:31 am
- Location: Glasgow
- Contact:
Re: JED Checker
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
just discovered it
will be trying ++ tomorrow
looks like i will want to use both!
BUT notepad is very good for making notes !
r
-
- Joomla! Explorer
- Posts: 260
- Joined: Tue Sep 01, 2009 11:31 am
- Location: Glasgow
- Contact:
Re: JED Checker
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
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