Message Renumbering after Update


Home Forums Front End PM PRO Message Renumbering after Update

This topic is: Resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #16820
    David
    Participant

    Hi,

    Just updated to the new version and completed the database update. It has renumbered all messages starting at 1. Unfortunately I have about 20,000 messages which are all based on recorded order numbers so if they are renumbered it presents some huge problems for me. Is it possible to avoid this renumbering of messages after the database update?

    Thanks for your help.

    #16829
    Shamim Hasan
    Keymaster

    You should save order number in message meta, that way is recommended.
    If you want message id same as previous message id, you can update using https://github.com/shamim2883/front-end-pm version. Uninstall current version and download and install github version.
    remember if your database copy is already updated you cannot use that database copy. Use database copy before update.
    After update finish uninstall github version and install your latest PRO version of the plugin.

    Let me know.

    #16840
    David
    Participant

    I have tried this and it didn’t work.

    Please confirm I need to delete Front End PM Pro and then install and activate the GitHub version? Then after activating I update the database and the message IDs should remain the same? They didn’t…

    #16846
    Shamim Hasan
    Keymaster

    Please follow step by step
    1. Use your database backup copy which you made before this plugin update. Messages once updated cannot be updated again. So make sure you are using backup copy of your database which backup you made before this plugin update to 10.1.1.

    2. You can use github verion OR you can use current PRO version. If you use PRO version make sure to make these 2 changes https://github.com/shamim2883/front-end-pm/commit/2d0eec44b5824bd5526d0b9532d309771700a533 and https://github.com/shamim2883/front-end-pm/commit/ec6221f36e4d451140683380da9d1e547605c940

    3. Now click “Proceed” in admin notice and continue update.

    #16972
    David
    Participant

    I just restored the original database before I last updated. I updated Front End PM Pro to version 10.1.1. However, it seems that the 2 x changes that you mention above are already incorporated. Have you since made these changes to this version or do I need to do something else?

    #16978
    Shamim Hasan
    Keymaster

    These 2 changes backported to current version. So if you update this plugin now, then no need any more file changes. Just click “Proceed” and continue.

    #16980
    David
    Participant

    Thanks, that worked perfectly.

    One other small issue, before I was using the following in my functions.php.

    add_action( ‘fep_display_after_message’, function(){
    $authordata = get_userdata( get_the_author_meta(‘ID’) );

    if( in_array( ‘business’, $authordata->roles ) ){
    echo ‘<div id=”businesslink”>See more information and photos of ‘ . get_the_author_meta(‘display_name’) . ‘.</div>’;
    }
    });

    It is not working anymore although I can see that the action is still there. Any ideas?

    #16983
    Shamim Hasan
    Keymaster

    Use

    add_action( 'fep_display_after_message', function(){
    	$authordata = get_userdata( fep_get_message_field( 'mgs_author' ) );
    	
    	if( in_array( 'business', $authordata->roles ) ){
    		echo '<div id="businesslink">See more information and photos of <a href="' . esc_url( home_url( '/' ) ). $authordata->user_nicename . '">' . $authordata->display_name . '</a>.</div>';
    	}
    });
    
    #16994
    David
    Participant

    Thanks!

Viewing 9 posts - 1 through 9 (of 9 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.