Skip to content

Conversation

@SharkyKZ
Copy link
Contributor

Pull Request for Issue #23510.

Summary of Changes

This should fix using admin base path in frontend, e.g. when using Editors-XTD plugins.

Testing Instructions

Edit an article in frontend.
In editor, click CMS Content and any button (except Page Break or Read More)

Expected result

Modal with a list of items opens up.

Actual result

Modal with error appears, e.g.:

 View not found [name, type, prefix]: contacts, html, 

Documentation Changes Required

Maybe.

@mbabker @laoneo @wilsonge please review.

@mbabker
Copy link
Contributor

mbabker commented Jun 29, 2019

All this pull request is doing is re-affirming my feeling that it is time to deprecate having separate extensions per application (minus templates). Because there are more hacks to "proxy" things than benefits this separation really brings.

@SharkyKZ
Copy link
Contributor Author

If this is about the messy code, it seems to be here for B/C-ish reasons. We could stop using base_path configuration option in J4 components and just pass the appropriate prefix everywhere. Similarly like suggested here #23539 (comment).

@twister65
Copy link
Contributor

I have tested this item ✅ successfully on cb8d6cc


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25367.

1 similar comment
@alikon
Copy link
Contributor

alikon commented Jul 6, 2019

I have tested this item ✅ successfully on cb8d6cc


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25367.

@richard67
Copy link
Member

richard67 commented Jul 6, 2019

I have tested this item ✅ successfully on cb8d6cc

It seems that some backend language filesa are not loaded in the modals, but I think that's another issue and not subject of this PR, right?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25367.

@alikon
Copy link
Contributor

alikon commented Jul 6, 2019

i suppose so

@alikon
Copy link
Contributor

alikon commented Jul 6, 2019

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25367.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 6, 2019
@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 6, 2019

@richard67, yes. Related issue #25344.

@richard67
Copy link
Member

richard67 commented Jul 6, 2019

@SharkyKZ Ha, I knew there was something like that. Other question. Are you still waiting for requested reviews, or are the good tests sufficient for you?

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 6, 2019

It's up to maintainers now. Though I agree with @mbabker this is a rather ugly hack. We can probably do better here.

@richard67
Copy link
Member

richard67 commented Jul 6, 2019

Sure, but as far as I understand him, the right way would be far beyond the scope of this PR, and so I think this "ugly hack" is ok as a bug fix right now. Medium or long term we should really think over if this admin site thing still makes sense for plugins, modules, packages, and components, if I understand him right.

@richard67
Copy link
Member

We already have other ugly hacks for the same reason, see e.g. my PR #25404 .

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 6, 2019

I don't think that PR was a hack. But even if it was, it's not an excuse to add more hacks.

@richard67
Copy link
Member

Depends ... if adding hacks means more consistency because existing code is alrerady full of hacks it could make sense 😄 (attention, sarcastic joke)

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 6, 2019

Sure, but as far as I understand him, the right way would be far beyond the scope of this PR

We could do it here. This PR really just moves some existing code around. The code that was initially added for B/C reasons, so we wouldn't have to set prefixes per component. We could remove this code from MVC library and set correct prefixes in components. But this would affect 3rd party components as they would also have to do the same.

@richard67
Copy link
Member

I see.

@wilsonge wilsonge merged commit ba2c285 into joomla:4.0-dev Jul 23, 2019
@wilsonge
Copy link
Contributor

wilsonge commented Jul 23, 2019

Thanks!

Actually spent some time on this and the fix looks cleaner to me than what we had before too

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 23, 2019
@wilsonge wilsonge added this to the Joomla 4.0 milestone Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants