Topic Closed
feniweb
297 Posts

Hello

One problem with various plugins newest
1. Sticky Note
2. Model window Bootstrap

If I plug Deinstalliere remains the text and is no longer editable.
you get the following error message.

Edited: 4 years ago#7512

juergen
1.4K Posts
51.7K Downloads
16 Plugins
design, web development & visual effects

Well, that's sort of logical. If you uninstall a plugin, it's functionality will not be accessible anymore.

From the developers side there would be three solutions:

  1. Uninstalling a plugin will also remove all related content. I guess this would need quite an amount of scanning the whole site's content.
    Maybe there is such functionality already built into gpEasy I missed. Josh? 
  2. The created content could also simply be hidden. Not a good solution for various reasons.
  3. Keep existing content/sections without proper formatting and without editing capabilities but still removable.
    From my perspective, this is the best solution and it's what is currently happening.

Compare it with this scenario: If you create a Document using Word or InDesign and you decide to uninstall a used Font from your system later. Would you like to have all text set with this (now missing) font to be removed from the document when you open it? Certainly not.

Edited: 4 years ago#7520

fly06
263 Posts
18.2K Downloads
1 Themes
8 Plugins

This problem is not specific to the StickyNote plugin, the same message also popups when you try to edit some PHP-Execute content after having uninstalled the plugin.

So once such a plugin is uninstalled, the created content is useless and the user will have to delete it manually.

Using the "filetype-text" as a fallback content-type would probably solve this problem. 

 

4 years ago#7531

juergen
1.4K Posts
51.7K Downloads
16 Plugins
design, web development & visual effects

Using the "filetype-text" as a fallback content-type would probably solve this problem.

AFAIK currently this is not possible to achieve from the plugin's side unless there was a uninstall.php script called by gpEasy upon uninstallation.

Currently you cannot edit a section after uninstallation but you can copy it's content, remove the section and make a new "editable text" and paste the text into it.
For StickyNote this might make sense since it's nothing more than a text alternative with some special rendering. But it will not make sense for Execute PHP, FullCalendar and most of the others affected.

But, Frédérick, if you know a way to set a fallback content-type I will bake it into next versions of my plugins.

FYI: All the plugins listed here Plugins using InlineEdit_Scripts Hook will be affected in some way from the mentioned behavior:

I'd generally advocate removing/revising all plugin-based sections manually before uninstalling the related plugin(s).
 

4 years ago#7534

fly06
263 Posts
18.2K Downloads
1 Themes
8 Plugins

AFAIK currently this is not possible to achieve from the plugin's side unless there was a uninstall.php script called by gpEasy upon uninstallation.

There is no uninstall.php file but you can achieve the same result by using the WhichPage hook:

    private function onUninstallPlugin($path) {

        global $config;

        if (!common::LoggedIn()) {
            return $path;
        }

        $cmd = common::GetCommand();
        if ($cmd != 'confirm_uninstall') {
            return $path;
        }

        /* WRITE YOUR OWN UNINSTALL CODE HERE */
        
        return $path;

    }

I am actually using this approach in the SimpleBlogExtended plugin.

 

 

 

4 years ago#7539

juergen
1.4K Posts
51.7K Downloads
16 Plugins
design, web development & visual effects
Thank you! I just put it into my code snippets collection. This will come in handy.
4 years ago#7546

fly06
263 Posts
18.2K Downloads
1 Themes
8 Plugins

Thank you! I just put it into my code snippets collection. This will come in handy.

;)

I must admit that the  /* WRITE YOUR OWN UNINSTALL CODE HERE */ part of the snippet is probably not very straightforward in your case.

Btw, when I suggested to use a fallback content-type for uninstalled plugins, I was thinking about adding this feature in the gpEasy core not in the plugins.

There is still something (easy) you can probably do to improve the user experience post-uninstallation.

Instead of adding the attributes class and style on the server side (StickyNote.php) which makes them persistent you could add them on the client side (StickyNote.js).

 

 

4 years ago#7556

juergen
1.4K Posts
51.7K Downloads
16 Plugins
design, web development & visual effects

...probably not very straightforward in your case.

I would have to check all pages (incl. revisions) and Extra Content for StickyNote sections and delete or change them to filetype-text.
 

Instead of adding the attributes class and style on the server side (StickyNote.php) which makes them persistent you could add them on the client side (StickyNote.js).

This would only remove absolute positioning but not the editing problem. The classnames will be meaningless after uninstall. But class and styles are still ediable after uninstallation.

Inline_editing causes the error and this is bound to the filetype.

/edit: Maybe the best solution was if gpEasy would simply load standard CKEditor editing for unknown/unregistered (due to uninstallation) section types.

/edit2:

 /* WRITE YOUR OWN UNINSTALL CODE HERE */

you're right...
/* PUT YOUR AWESOME, SLICK AND INGENIOUS UNINSTALL CODE HERE */
looks a lot better ;-)

 

Edited: 4 years ago#7559

a2exfr
242 Posts
24.8K Downloads
2 Themes
10 Plugins

I don't think that a really big problem to delete uneeded sections manually.

For example, somethimes I need to reinstall the plugin, after delete and install all plugin's sections work again.

With your own uninstall code  it is not possible to user to change your mind.
 

 

4 years ago#7560

Topic Closed

 

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register