• Resolved Tharkon

    (@tharkon)


    We upgraded to version 5 last week but after noticing it had issues with scripts and nested shortcodes reverted back to version 4.
    We have since made changes to the shortcodes in version 4 that we would like to retain.
    But when we now upgraded to version 5 again, it reverted back to the shortcodes as they were when we first upgraded last week.
    I have tried to resolve this issue by downgrading to version 4 again, deleting all posts of the shortcoder post_type from wp_posts, and deleting the shortcoder_version option in wp_options and then doing a fresh upgrade.
    However it seems that this was not a fresh upgrade and the shortcodes from version 4 are not being converted to version 5 this time at all. They still exist in their version 4 format but the version 5 shortcode list is empty.

    What is the proper way to re-install version 5 after having reverted to version 4?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author vaakash

    (@vaakash)

    There is no need for you to trouble yourself with all the above steps.

    If you had upgraded from v4.6 –> v5.0.4+ the plugin automatically takes care of everything and the shortcodes will be migrated as in v4.6.

    By “reverted back to the shortcodes as they were when we first upgraded last week” did you check the shortcode content ? They would have been correct as in v4.6.

    Anyways, to go forward in your case you have to make a change to the code.

    shortcoder\includes\updates.php line no: 64 delete this text array_key_exists( 'post_id', $o_props ) || via FTP/FileManager

    After this delete the “shortcoder_version” option from DB and refresh any admin page once. Your shortcodes should be back.

    Revert the change ASAP via FTP/FileManager.
    Delete any duplicate post manually in the admin UI itself.

    Thread Starter Tharkon

    (@tharkon)

    Shortcode in version 4.6, as it has been since 9 Jan until just prior to updating today.
    https://i.snipboard.io/kiBtNc.jpg

    Shortcode in version 5.0 just after updating today, which is identical to how it was on 6 Jan.
    https://i.snipboard.io/bSVKs0.jpg

    I should add that in order to revert to 4.6, all I did was restore a back-up of the plug-in files.
    Either way, your fix works, and that is what matters, just thought I’d show these screenshots since you asked about the content.

    I have 37 further websites where the same thing might happen. They all upgraded to 5.0 on 6 Jan after which I reverted to 4.6 using FTP, and have made changes in those shortcodes since. They have not been updated to 5.0 yet. Would you recommend using your fix for those as well, or is there a bette way to prevent it going wrong in the first place?

    EDIT: to clarify, for those 37 websites, the outdated shortcoder posts still exist but are not currently in use. The shortcoder_version 5.0.1 option also still exists on those as well as the shortcoder_data option with the correct data.

    • This reply was modified 5 years, 1 month ago by Tharkon.
    Plugin Author vaakash

    (@vaakash)

    No worries !

    Since the previous version of the plugin was in 5.0.1 (or 5.0), you can simply upgrade to 5.1 and all the current shortcodes in v4.6 will be remigrated when you move to 5.1.

    Try this for one site first and proceed with further websites.

    Glad to hear that the change worked for you.

    Let me know if things worked for you.

    Thread Starter Tharkon

    (@tharkon)

    I ran a little test on one of the remaining websites.
    Edited one shortcode just prior to updating so I would know what to look out for.
    Then ran the update, and while it seems some shortcodes were updated (based on their displayed published date), the shortcode I had edited was not and the edit was not reflected.

    I then proceeded to delete all shortcodes in 5.1 (using the built in tools this time, rather than the database editor) and then delete the version option (using the databse editor).
    This caused 4 of the shortcodes to reappear with new versions, including the one I used in the test above.

    I will just continue using the method as you described above, it’s a few additional steps but so far it seems a certain solution.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Correct steps to re-install new version’ is closed to new replies.