No Code Attached Yet UI/UX
avatar Webdongle
Webdongle
20 Sep 2024

Steps to reproduce the issue

In Article Options >>> Editing Layout (tab) ...Publishing options Hide
Login front end as Super User (or as as user with 'Edit State')

Expected result

The 'Publishing' tab does not show

Actual result

The 'Publishing' tab shows but the 'Metadata' tab does not show

System information (as much as possible)

Additional comments

avatar Webdongle Webdongle - open - 20 Sep 2024
avatar Webdongle Webdongle - change - 20 Sep 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 20 Sep 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Sep 2024
avatar fgsw
fgsw - comment - 20 Sep 2024

@Webdongle #37816 related?

Maybe the Option mean "Hide some options but not the tab" and i misunderstand.

yes

Originally posted by @brianteeman in #37816 (comment)

avatar Webdongle
Webdongle - comment - 20 Sep 2024

Yes I see that reasoning. However the 'Publish' field should also be hidden with the 'Start Publishing' etc.?

Also the Options field could read 'Hide publishing Options' rather than 'Hide Publishing tab'?

Perhaps close in favour of #37816 ?

avatar brianteeman
brianteeman - comment - 20 Sep 2024

Can you check if there is a difference here between j4 and j5

avatar Webdongle
Webdongle - comment - 20 Sep 2024

J3.4.4.8 Hide set SHOW
fe edit 01

J3.4.4.8 Hide set HIDE
fe edit 02

avatar brianteeman
brianteeman - comment - 20 Sep 2024

@Webdongle

Can you check if there is a difference here between j4 and j5

avatar Webdongle
Webdongle - comment - 20 Sep 2024

Doesn't look like any difference to me. Have a look at the screenshots please. Does that look the same as J5 to you?

avatar brianteeman
brianteeman - comment - 20 Sep 2024

Your screenshots are both for j4

avatar Webdongle
Webdongle - comment - 20 Sep 2024

Yes and when I compare them to J5 they look the same. When you have J5 up and compare them to the J4 screenshots do they look the same to you?

avatar Pinkeltje
Pinkeltje - comment - 26 Sep 2024

Can reproduce in J5 as well

avatar coolcat-creations
coolcat-creations - comment - 11 Oct 2024

What needs to be done here?
I read the other closed PRs and guess its a naming issue.

Instead of the Option to Show or Hide "Publishing Options" maybe "Publishing Date fields" ?
And why is Metadata hidden with it, should that be added as extra option or should the condition be removed?

avatar Pinkeltje
Pinkeltje - comment - 11 Oct 2024

Not a programmer but I think this solves the problem in "components\com_content\tmpl\form\edit.php"
from line 100

             <?php if ($params->get('show_publishing_options', 1) == 1) : ?>

        <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'publishing', Text::_('COM_CONTENT_PUBLISHING')); ?>

            <?php echo $this->form->renderField('transition'); ?>
            <?php echo $this->form->renderField('state'); ?>
            <?php echo $this->form->renderField('catid'); ?>
            <?php echo $this->form->renderField('tags'); ?>
            <?php echo $this->form->renderField('note'); ?>
            <?php if ($params->get('save_history', 0)) : ?>
                <?php echo $this->form->renderField('version_note'); ?>
            <?php endif; ?>
            <?php if ($params->get('show_publishing_options', 1) == 1) : ?>
                <?php echo $this->form->renderField('created_by_alias'); ?>
            <?php endif; ?>
            <?php if ($this->item->params->get('access-change')) : ?>
                <?php echo $this->form->renderField('featured'); ?>
                <?php if ($params->get('show_publishing_options', 1) == 1) : ?>
                    <?php echo $this->form->renderField('featured_up'); ?>
                    <?php echo $this->form->renderField('featured_down'); ?>
                    <?php echo $this->form->renderField('publish_up'); ?>
                    <?php echo $this->form->renderField('publish_down'); ?>
                <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->form->renderField('access'); ?>
            <?php if (is_null($this->item->id)) : ?>
                <div class="control-group">
                    <div class="control-label">
                    </div>
                    <div class="controls">
                        <?php echo Text::_('COM_CONTENT_ORDERING'); ?>
                    </div>
                </div>
            <?php endif; ?>
        <?php echo HTMLHelper::_('uitab.endTab'); ?>
`
avatar coolcat-creations
coolcat-creations - comment - 11 Oct 2024

Yes I know, that's what I am asking if there was any reason putting it in the condition. and what needs to be done, then I create a PR

avatar Pinkeltje
Pinkeltje - comment - 11 Oct 2024

@coolcat-creations : Edited my previous contribution. Think this solves it.
Image
Image

avatar Pinkeltje
Pinkeltje - comment - 11 Oct 2024

Just found out that when doing this, one is unable to select category (which is located in publishing tab.
Maybe it can be solved by changing line 57 to

                <?php echo $this->form->renderField('articletext'); ?>
                  <?php if ($params->get('show_publishing_options', 1) == 0) : ?>
                  <?php echo $this->form->renderField('catid'); ?>
   <?php endif; ?>
avatar chmst
chmst - comment - 13 Oct 2024

Where did you set the param, @Webdongle? I cannot find any param for for the frontend.
show_publishing_options is meant as param for the backend, but for some reason it is used in the edit screen on frontend.

I would see this as a bug in frontend edit screen.

Image

avatar brianteeman
brianteeman - comment - 13 Oct 2024

@chmst where is that text from? I would say that the text is wrong for both publishing and article options and that text and its use of the word TAB are what is causing the confusion. For me everything is working exactly as it was designed

avatar Webdongle
Webdongle - comment - 14 Oct 2024

@brianteeman
That is from the help page for Article options

@chmst
When the option is show then on the front end the frontend edit screen shows more options on the Publishing tab (the header that says 'Publishing'). And the Metadata tab (the header that says 'Publishing') is seen
When the option is Hide then on the front end the frontend edit screen shows less options on the Publishing tab (the header that says 'Publishing'). And the Metadata tab (the header that says 'Publishing') is NOT seen.

@brianteeman Says that is as expected.

So if that is the way it is supposed to work then we have to work with it and hope someone can update the help docs.

Spot the difference

Set Show
Image

Set Hide
Image

Addendum
I edited the docs page https://docs.joomla.org/Help5.x:Articles:_Options
but the help page https://help.joomla.org/proxy?keyref=Help52:Articles:_Options hasn't updated

avatar coolcat-creations
coolcat-creations - comment - 14 Oct 2024

Should we just clean up these options a bit and add options for frontend and backend and make everything more clear?

avatar chmst
chmst - comment - 14 Oct 2024

I have prepared a PR with a re-arrangement of fields and tabs. Will commit when I am back on my laptop.

But I disagree with changing the docs. All these switches are only for backend and it is not consistent that one of them is for backend and frontend, the others are not.
We should have eihter a switch for Show_published on frontend (like for images) or show always all fields.

What we have now is not consistent from usability point of view

avatar chmst chmst - change - 14 Oct 2024
Labels Added: UI/UX
avatar chmst chmst - labeled - 14 Oct 2024
avatar Webdongle
Webdongle - comment - 14 Oct 2024

But I disagree with changing the docs. All these switches are only for backend

But the Help screen says the switch is for admin when the switch actually alters fields and removes a whole tab from the edit screen in the front end.

Perhaps the questions should be:
Why is the layout of front edit screen different to the admin edit screen (except of course for the Permissions tab)
and
Why does the switch have different affects on the front edit screen than it does the admin side.

avatar chmst
chmst - comment - 14 Oct 2024

Perhaps the questions should be:
Why is the layout of front edit screen different to the admin edit screen (except of course for the Permissions tab)
and
Why does the switch have different affects on the front edit screen than it does the admin side.

This is the question, but I have no answer. Please test the PR #44246 if this is convenient.

avatar brianteeman
brianteeman - comment - 14 Oct 2024

the help screen is simply wrong. the code is correct

avatar chmst
chmst - comment - 14 Oct 2024

If the code is correct, then the help screen is wrong.
The question is, IF the code is correct.

Fact is, that the edit screen is confusing, because general article options and publishing Option are mixed in one tab.

avatar Webdongle
Webdongle - comment - 14 Oct 2024

I do not understand why you have the featured field in one tab but Start Featured and Finish Featured in a different tab

avatar brianteeman
brianteeman - comment - 14 Oct 2024

If the code is correct, then the help screen is wrong. The question is, IF the code is correct.

Check the history of the code. That gives you the answer

avatar chmst
chmst - comment - 14 Oct 2024

I stop here. Who wants can test the PR or make an aternative PR and who wants can contine this useless discussion.

avatar coolcat-creations
coolcat-creations - comment - 14 Oct 2024

Where is the PR @chmst :-)

avatar chmst
chmst - comment - 14 Oct 2024
avatar coolcat-creations
coolcat-creations - comment - 14 Oct 2024

thank you :-)

Add a Comment

Login with GitHub to post a comment