• Resolved Grzegorz.Janoszka

    (@grzegorzjanoszka)


    Thank you for the fantastic plugin. I love it and I use it on my website.

    While I was diagnosing problems with my RSS feeds (described in the thread “PHP errors”) I deactivated several plugins, including GCB, to see if it helps.

    I have sorted it eventually out, but then I noticed that content block ID 1 got missing. I had contentblocks 1 to 1, but after a few deactivations and activations of your plugin I had only 2 to 4. I tried to create a new one, but it got ID 5.

    It is not a problem to recreate it, but how can I get ID 1 back? I have in about 50 places on my website the code to use contentblock 1, so I would love to be able to have it back, instead of to change all of those pages.

    So while I thank you for your support, I would like to ask you to verify, how it was possible that one block got missing, and – how can I get back my block ID 1 after it got lost?

    Thank you in advance and all the best for you and your family in 2016 🙂

    https://wordpress.org/plugins/global-content-blocks/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Grzegorz.Janoszka

    (@grzegorzjanoszka)

    I know that I could use my own names instead of calling the content blocks by numbers. Isn’t there a slight performance penalty for registering multiple names for shortcodes instead of just one with id parameter?
    Please help me on this one 🙂

    Plugin Author Dave Liske

    (@delmarliske)

    Hi Grzegorz, I know there was a similar issue a couple months ago, before I took the plugin over. I was never quite able to solve it. Something to know about how the data is stored is that the ID is actually the data table’s automatically-generated record ID. As the issue always seems to start with ID-1, and the data can still be found in the wp-options table, it’s not an issue I’ve been able to solve yet.

    Hving said that, for various reasons (one being a security issue for some users) I’m working on a complete rebuild of the plugin. In the new version there will be a secondary ID field that users can change (with safeguards against duplications, of course). This will allow for recreation of IDs regardless of the record ID (the previous ID will be blocked via the safeguards), and also solve the issue of IDs changing during export/import operations.

    There might be performance issues with using names via the IDs, it’s not something I’ve measured. I’d believe they be minimal though as the code snippets for the two types is almost identical.

    I apologize for not having a better answer. This is just something that has to be a slightly longer-term solution via the current rebuild.

    Thread Starter Grzegorz.Janoszka

    (@grzegorzjanoszka)

    Dave,

    Thank you for your honest answer. What do you think is a better solution for me? Can I just edit the DB to change the ID 5 to 1? Is it just a change in one table or something more complicated? I have no problems with SQL commands and so on, I just prefer to know how many changes would be required.
    Could you please mention which tables I should look into?

    Thank you in advance.

    Plugin Author Dave Liske

    (@delmarliske)

    Unfortunately the ID isn’t an editable field within the record, and is actually write-protected. It’s auto-generated when you create a new block and isn’t something that can be controlled. This is why I’m building a secondary editable ID field into the new version, one that follows the auto-generated ID but can be changed if necessary when a replacement block has to be created. Building such a thing into the current version isn’t something practical right now, as I’m still determining how to build the migration to the secondary ID into verson 3.0.0. Unfortunately (again, I’m sorry) changing the pages is the only thing that makes sense for now.

    Thread Starter Grzegorz.Janoszka

    (@grzegorzjanoszka)

    Dsve,

    Well, in max half an hour I shall be able to update all the links, I hope – it is not a big problem. Does the problem affect only ID 1, or the first one? I mean – when I deactivate the plugin now and reactivate it again – is it possible I would lose the block #2?

    Plugin Author Dave Liske

    (@delmarliske)

    Since I haven’t been able to duplicate the issue, I really have no way of knowing. It seems as though the data stream for the block content might be getting corrupted but I really don’t quite know why it’s happening or how far it might go.

    Thread Starter Grzegorz.Janoszka

    (@grzegorzjanoszka)

    Thank you very much for all your support.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Content block ID 1 missing after deactivating plugin’ is closed to new replies.