Hi to all developers of joomla,
I'm trying to build a new feature for Joomla 4x, because I'm missing a note-field for plugins. I'v done it in my J3.9.6 Installation as a core-hack. There I use the isis-template. Doku see -> https://moba-hgh.de/joomla
When setting up this in my Joomla! 4.0.0-alpha9-dev environment, all works, but I get a little bug in the plugins formview. The note-field is inserted twice in the right area. -> see the formview-picture
The green frame is the right place and the red frame is the bug !
I can't find any place, where the bug is generated. Please can anybody help.
When I get it to run, I will make a standard feature-request via github.
Greetings from germany
HGH
Title |
|
Title |
|
Title |
|
Labels |
Added:
J4 Issue
|
Status | New | ⇒ | Discussion |
Labels |
Added:
?
|
Title |
|
Impossible to guess without seeing the code
@hgh-esn
By the way: I've read your 3.9-documentation that you've linked to in your first comment. Are you aware that fields system_data
and custom_data
are removed from table #__extensions
in Joomla 4?
See further discussion here: #19348
The discussion/the issue is still open if the related PRs shall be reverted but...
Are you aware that fields system_data and custom_data are removed from table #__extensions in Joomla 4?
... yes I am - and was surprised about that. But in my J4-patch I have created a new field named "note" in #__extensions. So it should be not a problem.
The only problem that I have at the moment is the duplicate display of the note-field in the formview. If this is cleared I will make all necessary steps to get it into the core.
here comes a screenshot from the file, that - for me - produces the messing code.
the original file is: .../administrator/components/com_plugins/tmpl/plugin/edit.php
The green framed area is code, I putted in.
When I comment out the code in the red frame, the issue isn't there - but also the fields "Status" and "Access" are missing ;).
So I think the issue comes from the "LayoutHelper::render('joomla.edit.global', $this)" statement.
This morning I inspected the code around 'joomla.edit.global'
(we find it in: ".../layouts/joomla/edit/global.php") ;)
`<?php
/**
defined('JPATH_BASE') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
$app = Factory::getApplication();
$form = $displayData->getForm();
$input = $app->input;
$component = $input->getCmd('option', 'com_content');
if ($component === 'com_categories')
{
$extension = $input->getCmd('extension', 'com_content');
$parts = explode('.', $extension);
$component = $parts[0];
}
$saveHistory = ComponentHelper::getParams($component)->get('save_history', 0);
$fields = $displayData->get('fields') ?: array(
'transition',
array('parent', 'parent_id'),
array('published', 'state', 'enabled'),
array('category', 'catid'),
'featured',
'sticky',
'access',
'id',
'language',
'tags',
'note',
'version_note',
);
...`
When I comment out the 'note' field, my problem is solved.
My decision is to build in a code-switch as:
If ($component !== 'com_plugins' { .... do that above } else { ... do that above without the fields 'note', 'version_note' }
In first tests it runs perfect.
do that above without the fields 'note', 'version_note'
You don't have to exclude 'version_note' because this field doesn't exist in plugins. No "automatic" output will happen then.
What I would do:
note
. Create a pr with the basic changes and wait for comments if somebody doesn't want the field where it automatically is. That's one of the reasons why we are on GitHub. You can change and adjust your pr stepwise. The first step is that it works and others can test the functionality.$displayData['fields'}
before the JLayout is called./layouts/joomla/edit/global.php
only for com_plugins
.Again: That's what I would do (starting with the first solution) but I don't have to decide that.
Hi to all,
at the moment, I'm gathering all informations together to make a branch later.
But I have some questions.
The feature needs a new field named "note" in the db-table "#__extensions".
In my test-environment I used phpMyAdmin to create the field via an ALTER table command.
In Joomla, this field must be created on installation. Therefore I have identified a file "joomla.sql" in the folders
../installation/sql/mysql/ and ../installation/sql/postgresql/
Questions:
Database:
Languages:
I have to setup 2 language-keys for the note-field.
This entries must be in the language-folder/-file: /administrator/language/en-GB/en-GB.com_plugins.ini
How is the process to get the international-translation?
What is the difference-usage for those two folders?
One is for mysql databases the other one for postgresql databases. Both can be used in Joomla.
Are that the areas, where to define the sql for db-tables for full-installations?
Yes.
Where are the areas, when using an Joomla-update-package?
administrator/components/com_admin/sql/updates/
How is the process to get the international-translation?
"Automatically". Your pr gets a "Language Change" label. You don't have to do more. Just en-GB.*.ini
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-05-20 20:04:32 |
Closed_By | ⇒ | joomla-cms-bot |
Closed_By | joomla-cms-bot | ⇒ | Quy |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/24920
See PR #24966
Nice idea.
It would be useful since tooltips have been removed from admin.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24920.