?
avatar infograf768
infograf768
14 Mar 2020

Steps to reproduce the issue

Uninstall com_newsfeeds via Extensions Manage

Go to Information: Database and select Joomla CMS.
Click on Update Structure.
We get Alert stating that the newsfeeds table does not exist and Warning that there are tables not up to Date.
Hovering the One Problem badge gives

Screen Shot 2020-03-14 at 10 51 51

avatar infograf768 infograf768 - open - 14 Mar 2020
avatar joomla-cms-bot joomla-cms-bot - change - 14 Mar 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Mar 2020
avatar brianteeman
brianteeman - comment - 14 Mar 2020

what do you mean by the title of this PR "creates a false alarm" ?

avatar SharkyKZ
SharkyKZ - comment - 14 Mar 2020
avatar ReLater
ReLater - comment - 14 Mar 2020

That's a good example why it's sad that pr #17219 never found its way into J!3 in time.

Core extensions shouldn't be uninstallable.

avatar ChristineWk
ChristineWk - comment - 14 Mar 2020

Usually, when an extension is uninstalled, its table is also empty. That's why this message doesn't fit?
Ah, I see new comments. Hv to read it.


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

avatar ChristineWk
ChristineWk - comment - 14 Mar 2020

That's a good example why it's sad that pr #17219 never found it's way into J!3 in time.

Core extensions shouldn't be uninstallable.

That's right. It is a Core extension.

avatar infograf768
infograf768 - comment - 14 Mar 2020

Indeed this happens because it is a core extension

avatar wilsonge
wilsonge - comment - 14 Mar 2020

@infograf768 is this different from 3.x?

avatar infograf768
infograf768 - comment - 14 Mar 2020

I guess not as #17219 was for 3.9

avatar infograf768
infograf768 - comment - 14 Mar 2020

Now, as you are all here.
I get another nice error with the new table (clean install, which means the table IS present)
Screen Shot 2020-03-14 at 12 07 25
Table 'dfrvh_webauthn_credentials(' does not exist. (From file 4.0.0-2019-07-02.sql.)

Remark the weird ('

String is
COM_INSTALLER_MSG_DATABASE_CREATE_TABLE="Table %2$s does not exist. (From file %1$s.)"

avatar ReLater
ReLater - comment - 14 Mar 2020

Just for completion. 3.9.17-dev

14-03-_2020_12-13-01

avatar SharkyKZ
SharkyKZ - comment - 14 Mar 2020

Now, as you are all here.
I get another nice error with the new table (clean install, which means the table IS present)
Screen Shot 2020-03-14 at 12 07 25
Table 'dfrvh_webauthn_credentials(' does not exist. (From file 4.0.0-2019-07-02.sql.)

Remark the weird ('

String is
COM_INSTALLER_MSG_DATABASE_CREATE_TABLE="Table %2$s does not exist. (From file %1$s.)"

Please test PR #28337.

avatar infograf768
infograf768 - comment - 14 Mar 2020

Thanks @SharkyKZ
I leave this issue open as it concerns the updates

avatar infograf768
infograf768 - comment - 14 Mar 2020

btw, without re-doing @mbabker patch as no one looks like volunteering, we could, for J4, forbid uninstalling core stuff by adding protected for all.

avatar SharkyKZ
SharkyKZ - comment - 14 Mar 2020

Protected flag also prevents disabling extensions. That's why we need a separate flag. Or maybe we could make use of Joomla\CMS\Extension\ExtensionHelper::checkIfCoreExtension(). The advantage of this is not allowing 3rd party extension to have core status.

avatar ChristineWk
ChristineWk - comment - 14 Mar 2020

@infograf768 > would be a good idea. Volunteering: Could do it, if I would know, how - I'm not programmer etc. :-)
@ReLater > confirm J 3.9.16


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28336.
avatar infograf768
infograf768 - comment - 14 Mar 2020

Honestly the best would be Michael proposal.
@SharkyKZ if you feel that would do it, why not proposing a PR.

That is, if @wilsonge and @HLeithner agree, to avoid working for nothing.

avatar HLeithner
HLeithner - comment - 14 Mar 2020

Core extensions shouldn't be uninstallable.

but should be possible to disable

avatar ReLater
ReLater - comment - 14 Mar 2020

but should be possible to disable

That's the reason why we linked to #17219

avatar wilsonge wilsonge - change - 14 Mar 2020
Title
[4.0] Deleting a core component create false alarm in Information: Database
Deleting a core component create false alarm in Information: Database
avatar wilsonge wilsonge - edited - 14 Mar 2020
avatar wilsonge
wilsonge - comment - 14 Mar 2020

I agree michael's proposal seems sensible to me

avatar Bakual
Bakual - comment - 14 Mar 2020

Or using the extensionHelper method we have now.

avatar mbabker
mbabker - comment - 14 Mar 2020

Don’t use the extension helper method. It is crap that there exists code to distinguish first party and third party extensions, and behaviors favoring first party extensions should not be added to the platform without a way for third party to do the same (@Bakual I seem to remember a recent issue/PR where you just had this exact groan, hence the reason the two flags on the database tables are the method Andre then me went with; there is nothing wrong with a third party locking an extension blocking uninstall if for example they aren’t using package extension types and some “sub extension” shouldn’t be uninstalled without removing the parent).

There is a reason none of the flags were called “core”, let’s keep it that way ?

avatar chmst
chmst - comment - 14 Mar 2020

I prefer Michaels proposal. It is clear and flexible.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28336.
avatar Bakual
Bakual - comment - 14 Mar 2020

If we're fine with 3rd party blocking uninstall, then obviously Michaels approach is correct.

for example they aren’t using package extension types and some “sub extension” shouldn’t be uninstalled without removing the parent

That's a bad example since you can already specify that in your XML manifest. It's for example used in the language package. But I get your point.
I'd just hope 3rd party don't misuse that flag ?

avatar mbabker
mbabker - comment - 14 Mar 2020

Nothing mandates that third parties use package extension types though. If you're using them, you already have that feature available via the package manifest flag. But, there is no requirement (nor should there ever be) that "groups" of extensions can only be installed via packages.

foreach ($packages as $package) {
    // Oversimplified but whatever
    (new JInstaller)->install($package);
}

Doesn't matter whether that snippet runs in the package installer or an extension install script or if some third party creates a new extension type (because one can extend the installer API) with a new extension adapter and has a feature to handle auto-lock/protect there.

That's why I say the database is the better way to do it versus another hardcoded list in core and another capability that only exists to core. Sure, someone is probably going to misuse it, but those are the folks you name and shame for writing bad extensions versus writing core in a way to prevent a feature being possible.

avatar jwaisner jwaisner - change - 15 Mar 2020
Status New Confirmed
avatar joomla-cms-bot joomla-cms-bot - change - 26 Mar 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-03-26 03:46:34
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 26 Mar 2020
avatar Quy Quy - change - 26 Mar 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-03-26 03:46:34
Closed_By Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 26 Mar 2020

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/28336

avatar Quy
Quy - comment - 26 Mar 2020

Please test PR #28462


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

Add a Comment

Login with GitHub to post a comment