• Resolved ctrlaltdelete

    (@ctrlaltdelete)


    I need to merge 2 blogs into 1. I have paid version of this plugin.
    The way i’m doing this is using the export and import tool.
    I can see the rating data on the XML but when import it on the final blog, the posts have no ratings.
    This is an xml relevant part:

    <wp:postmeta>
                    <wp:meta_key>_gdrts_stars-rating_sum</wp:meta_key>
                    <wp:meta_value><![CDATA[17]]></wp:meta_value>
                </wp:postmeta>
            	<wp:postmeta>
                    <wp:meta_key>_gdrts_stars-rating_max</wp:meta_key>
                    <wp:meta_value><![CDATA[5]]></wp:meta_value>
                </wp:postmeta>
            	<wp:postmeta>
                    <wp:meta_key>_gdrts_stars-rating_votes</wp:meta_key>
                    <wp:meta_value><![CDATA[6]]></wp:meta_value>
                </wp:postmeta>
            	<wp:postmeta>
                    <wp:meta_key>_gdrts_stars-rating_rating</wp:meta_key>
                    <wp:meta_value><![CDATA[2.8]]></wp:meta_value>
                </wp:postmeta>
            	<wp:postmeta>
                    <wp:meta_key>_gdrts_stars-rating_distribution</wp:meta_key>
                    <wp:meta_value><![CDATA[a:5:{s:4:"5.00";i:2;s:4:"4.00";i:0;s:4:"3.00";i:1;s:4:"2.00";i:1;s:4:"1.00";i:2;}]]></wp:meta_value>
                </wp:postmeta>
            	<wp:postmeta>
                    <wp:meta_key>_gdrts_stars-rating_latest</wp:meta_key>
                    <wp:meta_value><![CDATA[2020-02-14 14:31:38]]></wp:meta_value>
                </wp:postmeta>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ctrlaltdelete

    (@ctrlaltdelete)

    I see the data getting imported the the database:

    wp_postmeta contains:

    _gdrts_stars-rating_distribution
    _gdrts_stars-rating_latest
    _gdrts_stars-rating_max
    _gdrts_stars-rating_rating
    _gdrts_stars-rating_sum
    _gdrts_stars-rating_votes

    and wp_gdrts_items contains 1 item with the post id, entity, name, etc.

    however: isset($item->meta['stars-rating_rating']
    Returns false for this post type.
    Stars method is default of all types.

    I don’t see what’s wrong. Any ideas?

    Thread Starter ctrlaltdelete

    (@ctrlaltdelete)

    I understand now. The plugin doesn’t care about wp_postmeta, that’s only there because of the “Sync Meta” Addon.

    So since this is merging job i can’t simply import “wp_gdrts_itemmeta” table, because it already exists and contains data (there will be collisions with posts id).

    Since collisions are already avoided by the WordPress importer, and the votes are already in wp_postmeta.

    I would need an “inverted Sync Meta” Addon, that would take the votes from wp_postmeta and copy them to wp_gdrts_itemmeta table.

    Any possible help with this? Most of the code must already been written on the existing migrations addons.

    Plugin Author Milan Petrovic

    (@gdragon)

    Hi,

    This is not going to be implemented, because the meta table only contains final vote, it lacks the votes log. Also, the only proper way to export votes along the posts is to do database migration, not WordPress Export/Import. Plugin has multiple tables in the database that contain a lot more data that is needed for plugin to work properly.

    Regards,
    Milan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do you export posts ratings to another blog?’ is closed to new replies.