?
avatar Bakual
Bakual
24 Apr 2021

Problem identified

Sorry for being late with this, I should have looked more closely at the original PR: #33264

Currently, the URL of the "Create" buttons point directly to the edit layout of the view. Eg 'index.php?option=com_content&view=article&layout=edit'.
I think this is wrong, it should go to the controller and be index.php?option=com_content&task=article.add

Also, I think we should add a check if the user actually is allowed to create an item, like we do for the "New" button.

Proposed solution

Correcting URL of the button and add a check for permissions.

avatar Bakual Bakual - open - 24 Apr 2021
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Apr 2021
avatar Bakual
Bakual - comment - 24 Apr 2021

@brianteeman @PhilETaylor Sorry for not seeing this when I first looked at the PR.

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

I would not say its an "issue" with the concept, more the implementation.

This is not bypassing ACL or anything like that (I think) as Joomla would still kick in eventually and block someone if they did not have ACL to create the items.

The PR was really a Proof of concept, which was jumped on and merged very quickly as it seems people loved the idea.

I fully expect this new concept to be enhanced and improved on over time

Once all @brianteeman blank state PR's are merged I had more improvements to made, and enhancements to make.

Those include but are not limited to

  • instead of a new blankslate.php HTML page for each component, have a single "template" of the page, and the component passes into that template the icon, title, paragraph, and buttons as a configuration for the template
  • providing a way that this template can be used with admin template overrides
avatar Bakual
Bakual - comment - 24 Apr 2021

That's a great idea!

If you use JLayouts for the body, that could be done easily. You'd still need the blank state layoutfile, but in that layout file you more or less would just load the generic JLayout with the needed data passed in. This way you got the reusable layout.
JLayouts are also overrideable by the template, so that would work as well.

I may have some time this evening to work on it, if you're not faster ?

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

I fear my day is going to be taken up with the FTP Layer issues - so please feel free to work on this. It looks like @brianteeman PRs from yesterday are all merged already https://github.com/joomla/joomla-cms/pulls?q=is%3Apr+%22blank+state%22+

avatar brianteeman
brianteeman - comment - 24 Apr 2021

and I wont be doing any more today as I am attending joomladay usa. 90% of those remaining are not simple ones to resolve. THey're not simple copy & paste

avatar brianteeman
brianteeman - comment - 24 Apr 2021

As I was creating these I did think it was a lot of repetitition that could probably be more reusable AND also therefore a resource for extension developers to easily use.

Many of the language strings could probably be abstracted as well and as I just used the existing help link for the learn more then thats another point of abstraction/automation

avatar Bakual
Bakual - comment - 24 Apr 2021

See #33288

Many of the language strings could probably be abstracted as well and as I just used the existing help link for the learn more then thats another point of abstraction/automation

I've already moved the "Learn More" one to a global string. Maybe more can be done indeed.

avatar Bakual Bakual - change - 24 Apr 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-04-24 19:20:31
Closed_By Bakual
avatar Bakual Bakual - close - 24 Apr 2021

Add a Comment

Login with GitHub to post a comment