Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing tab still shows #44118

Open
Webdongle opened this issue Sep 20, 2024 · 29 comments
Open

Publishing tab still shows #44118

Webdongle opened this issue Sep 20, 2024 · 29 comments

Comments

@Webdongle
Copy link
Contributor

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

@fgsw
Copy link

fgsw commented Sep 20, 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)

@Webdongle
Copy link
Contributor Author

Webdongle commented Sep 20, 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 ?

@brianteeman
Copy link
Contributor

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

@Webdongle
Copy link
Contributor Author

J3.4.4.8 Hide set SHOW
fe edit 01

J3.4.4.8 Hide set HIDE
fe edit 02

@brianteeman
Copy link
Contributor

@Webdongle

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

@Webdongle
Copy link
Contributor Author

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

@brianteeman
Copy link
Contributor

Your screenshots are both for j4

@Webdongle
Copy link
Contributor Author

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?

@Pinkeltje
Copy link

Can reproduce in J5 as well

@coolcat-creations
Copy link
Contributor

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?

@Pinkeltje
Copy link

Pinkeltje commented Oct 11, 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'); ?>
`

@coolcat-creations
Copy link
Contributor

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

@Pinkeltje
Copy link

Pinkeltje commented Oct 11, 2024

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

@Pinkeltje
Copy link

Pinkeltje commented Oct 11, 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; ?>

@chmst
Copy link
Contributor

chmst commented Oct 13, 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

@brianteeman
Copy link
Contributor

@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

@Webdongle
Copy link
Contributor Author

Webdongle commented Oct 14, 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

@coolcat-creations
Copy link
Contributor

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

@chmst
Copy link
Contributor

chmst commented Oct 14, 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

@Webdongle
Copy link
Contributor Author

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.

@chmst
Copy link
Contributor

chmst commented Oct 14, 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.

@brianteeman
Copy link
Contributor

the help screen is simply wrong. the code is correct

@chmst
Copy link
Contributor

chmst commented Oct 14, 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.

@Webdongle
Copy link
Contributor Author

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

@brianteeman
Copy link
Contributor

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

@chmst
Copy link
Contributor

chmst commented Oct 14, 2024

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

@coolcat-creations
Copy link
Contributor

Where is the PR @chmst :-)

@chmst
Copy link
Contributor

chmst commented Oct 14, 2024

#44246

@coolcat-creations
Copy link
Contributor

thank you :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants