jacobwb / hashover-next

This branch will be HashOver 2.0
GNU Affero General Public License v3.0
420 stars 87 forks source link

How to transfer comments after updating hashover-next #267

Closed icandura closed 5 years ago

icandura commented 5 years ago

Hello, I updated the new version of hashover-next because of changing the VPS. Previously, I was using an earlier version of hashover-next, but not hashover 1.0. The old "changelog.txt" shows that it's version like that:

Changes by Jacob Barkdull 2017-04-09
......
......
Changes by Jacob Barkdull 2017-04-04
--------------------------------------------------------------------------------
* Default theme: Now using border-box everywhere.
* Fixed: Locale text left unescaped in login field titles.

Changes by Jacob Barkdull 2017-03-25
--------------------------------------------------------------------------------
* Fixed uncaught syntax error in AJAX response.
* Improved how HashOver accesses its loader script.
......
......

In this version, the folder structure of the comments is like this:

pages
--post-22
----.metadata
----1.xml
----1-1.xml
----2.xml
----......

The content of ".metadata" file is like this:

{
    "title": "HEXO\u8bc4\u8bba\u4ece\u201c\u591a\u8bf4\u201d\u642c\u8fc1\u5230Hashover | \u574e\u675c\u62c9\u5b83\u77ed\u8def\u5566",
    "url": "http:\/\/www.mydomain.com\/post-22\/",
    "status": "open",
    "latest": [
        "30-1",
        "30",
        "29-2",
        "30",
        "29-1",
        "28-1",
        "29",
        "28",
        "30",
        "29"
    ]
}

And the xml files is like this:

<?xml version="1.0" encoding="UTF-8"?>
<comment>
    <body>
        comment contents
    </body>
    <date>2017-05-23T09:18:56-0700</date>
    <name>Naifu</name>
    <email>kwrPiCj91Ew12AUWyR/WiU2hjbrqLa9E6GcdOENz9bw=</email>
    <encryption>1,1,14,1,2,7,5,5,0,4,28,8,8,7,8,5</encryption>
    <email_hash>7a227b879c07491250295d0c01d7dd1a</email_hash>
    <notifications>yes</notifications>
    <website>https://blog.ps/</website>
</comment>

I found that is different with new version. Tthe folder structure of the comments in new version is like this:

threads
--post-22
----metadata
------latest-comments.json
------page-info.json
----1.xml
----1-1.xml
----2.xml
----......

The old version of the .metadata file is split into two JSONs in the new version. And the new xml file like this:

<?xml version="1.0" encoding="UTF-8"?>
<comment>
    <body>
        comment contents
    </body>
    <date>2019-07-13T16:09:29+0800</date>
    <name>test</name>
    <login_id>626b01923a46cb76946a867023a3e100bc9d8afa</login_id>
    <email>9Y3f3PnHrg3VJxHLmcEYsZ9aW+rR7s946rSGMjrre609i7SczEIy3QknEdHXCjOR</email>
    <encryption>38,20,27,38,4,20,3,3,34,4,15,1,23,6,1,1</encryption>
    <email_hash>dfa820de1c04e04ef75cd30d8730e559</email_hash>
    <notifications>yes</notifications>
    <ipaddr>xxx.xxx.xxx.xxx</ipaddr>
</comment>

In the xml files of the new version, the login_id tag is added, and the content in the email tag is encrypted differently than before.

I tried to manually modify the metadata and xml content after moving the comments folder to the new path.But still not working.Some comments show an error. hashover

The xml content displayed normally is like this

<?xml version="1.0" encoding="UTF-8" ?>
<comment likes="0" notifications="yes" ipaddr="">
    <name>toris</name>
    <email>toris@wordpress.disqus.net</email>
    <passwd></passwd>
    <website></website>
    <date>2013-07-21T11:07:35Z</date>

    <body>&#60;p&#62;&#38463;&#26366;&#21834;,&#25105;&#26469;&#36393;&#36393;{smile:1}&#60;/p&#62;</body>
 <email_hash>04b7e7ba1a6acafe422a76467ecde8ab</email_hash>
</comment>

And xml content displayed error is like this

<?xml version="1.0" encoding="UTF-8"?>
<comment>
    <body>
        好久不见,没想到你还在写博客。:)
    </body>
    <date>2017-05-16T19:37:09-0700</date>
    <name>麦子</name>
    <email>6K9ztO2Uvps0cwcQhkTeK82bwSDYgTVuwlvLR2GlU1ond35G9FO/BQxFchn8rz5k</email>
    <encryption>4,7,5,5,6,1,7,4,15,1,28,14,8,5,26,2</encryption>
    <email_hash>291c7491549dd3186c03af2a5f718af5</email_hash>
    <notifications>yes</notifications>
    <website>http://wheat.at</website>
</comment>

What should I do ?