[Resolved] Previous latest GPP version 1.12.3

Home Forums Support [Resolved] Previous latest GPP version 1.12.3

Home Forums Support Previous latest GPP version 1.12.3

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #1754328
    ch1800

    Is it possible to keep the latest previous GPP in my account’s download section please?
    As I certainly won’t update to the new one as long as sections are removed from there.

    Thanks.

    #1754401
    Elvin
    Staff
    Customer Support

    Hi there,

    The link for the older versions are not available on the download section, unfortunately.

    If you wish to get the older version, you can send us a mail requesting for a copy of the older version and we’ll try get it for you. 🙂

    #1754411
    ch1800

    Ha OK… noted, thanks.

    #1754413
    Elvin
    Staff
    Customer Support

    No problem. 🙂

    #1754467
    Tom
    Lead Developer
    Lead Developer

    If you want to keep Sections but stay up to date (recommended), you can use this snippet:

    add_filter( 'generate_premium_deprecated_modules', function( $modules ) {
        return array_diff( $modules, [ 'Sections' ] );
    } );

    Just keep in mind that Sections is now deprecated which means things may break in the future as WordPress moves away from the Classic editor.

    #1754484
    Graham

    Hi Tom,

    I run ClassicPress, which is a fork of WP4.9x and the latest version causes an error 500.

    I tried the filter above in my child functions.php file, but it didn’t work.

    I’ve uploaded an older version and changed the version number to 9.9.9

    My error log showed:

    PHP Fatal error: Uncaught Error: Call to undefined function register_block_type() in /home/xxxxx/public_html/wp-content/plugins/gp-premium/elements/class-block-elements.php:183

    Is there another way to prevent block code functions from being installed?

    #1754495
    ch1800

    Thanks Tom,

    I appreciate your feedback but even if WP moves away from Classic, lots of users like me will keep using it whatever happens.
    Gutenberg is really far from wide adoption.

    And the question is not how good/bad those blocks are. In fact, they are really good.
    But the question is about the way they are implemented and this is really bad in terms of UX, usage logic and interface.
    I work for small businesses and some of them want to keep updating their sites after handover. There are 0 chances to make them adopt blocks. Zero chance.

    OK, back to Sections module:
    This snippet works fine the same way if you update an existing site using Sections, from version 1 to version 2:
    it keeps sections active at first site install or if you update from an existing installation that was previously using sections.

    Problem is still that when wanting to change site from the library after that you lose the sections module!
    The only solution I found for such cases is to revert back to GPP version 1, change site and then update GPP to version 2 again.

    Is there a solution for that?

    Thanks.

    #1755861
    Tom
    Lead Developer
    Lead Developer

    Graham – will get this fixed in the next version. For now, can you test the fix for me to make sure it’s all that’s required with ClassicPress?

    In wp-content/plugin/elements/class-block-elements.php, find line 182, which looks like this:

    public function register_dynamic_blocks() {

    After it, add this:

    if ( ! function_exists( 'register_block_type' ) ) {
        return;
    }

    So it looks like this:

    public function register_dynamic_blocks() {
        if ( ! function_exists( 'register_block_type' ) ) {
            return;
        }

    As for the Sections issue – as long as that filter is added it really shouldn’t matter. That filter will make it so “Sections” appears in the list of modules to activate/deactivate in “Appearance > GeneratePress”. Whether it’s a new site or existing site should make no difference.

    #1756056
    Graham

    Thanks Tom.

    Adding the extra code allowed ClassicPress to work normally with the new GPP.

    I didn’t add the filter for sections, as they still work as normal.

    #1756057
    Tom
    Lead Developer
    Lead Developer

    Great to hear. Fixed in 2.0.1 🙂

    Thanks!

    #1756384
    Davood

    Thank you for sharing the filter above. One questions about the filter though. I am a user of the wp.org code not ClassicPress. Am I correct that I could add the filter into a site specific plugin that we have to avoid needing a plugin?

    #1756558
    ch1800

    This snippet doesn’t seem to have any èarticular effect if you update an existing site using Sections, from version 1 to version 2: sections are anyhow kept active if you update from an existing installation on version 1 that was previously using sections.

    I tested the snippet on a site with version 1 that was NOT using sections and updated to version 2 and sections vanished…
    I then tested on a new site installing version 2 from scratch with the snippet active and sections are not listed.

    So, what does this snippet do precisely?

    Also, problem is still that when wanting to change site from the library after that you lose the sections module!
    The only solution I found for such cases is to revert back to GPP version 1, change site and then update GPP to version 2 again.

    Is there a solution for that?

    #1756651
    Elvin
    Staff
    Customer Support

    Hi ch1800,

    Tom’s filter here – https://generatepress.com/forums/topic/previous-latest-gpp-version-1-12-3/#post-1754467 – simply enables adds back the Section module so users can enable it.

    The code Tom provided here – https://generatepress.com/forums/topic/previous-latest-gpp-version-1-12-3/#post-1755861 – is solely for Graham so ClassicPress works.

    Have you updated to GP Premium 2.0.1 released today? I believe Tom just applied this fix.

    @Davood

    Have you tried updating to GP Premium 2.0.1 as well? Try updating and try Tom’s filter here https://generatepress.com/forums/topic/previous-latest-gpp-version-1-12-3/#post-1754467

    Let us know if there are any errors.

    #1756663
    ch1800

    Hi Elvin,

    I updated my post above probably during the time you were replying to this.
    Please read it again as I just made several tests.

    Yes, I’m solely referring to Tom’s first snippet here.

    And yes, my latest tests are with version 2.0.1 but I don’t see any difference regarding sections.

    Summary of my previous post:

    – Sections are kept active *anyhow* (with or without the snippet) if the previous version had them active
    – I tested the snippet on a site with version 1 that was NOT using sections and updated to version 2 and sections vanished…
    – I then tested on a new site installing version 2 from scratch with the snippet active and sections are not listed.
    – when wanting to change site from the library after updating to version 2 with sections active, you lose the sections module.

    Thanks.

    #1756795
    Elvin
    Staff
    Customer Support

    I see.

    What happens if you try this instead?

    add_filter( 'generate_premium_deprecated_modules', function( $modules ) {
    
    	foreach ($modules as $key => $value){
        if ($value == 'Sections') {
            unset($modules[$key]);
        }
    	}
        return $modules;
    	
    });
Viewing 15 posts - 1 through 15 (of 23 total)
  • You must be logged in to reply to this topic.