Import-and-overwrite button broken in Ruffled Wren 1.6.1 #107

Closed
opened 2023-06-20 07:53:04 +00:00 by nosycat · 13 comments

Describe the problem

Trying to import another Feather Wiki file with the big red button in Settings has no effect, and shows an error in the browser console.

To Reproduce

  1. Go to 'Wiki Settings'
  2. Click on 'Import & Overwrite With Other Feather Wiki File'
  3. Pick a file to open
  4. The page title changes, but nothing else

Expected behavior

Import should complete normally.

Details (please complete the following information)

  • I am using this build: Ruffled Wren
  • I am using this version: 1.6.1
  • I am using this browser: Opera 78 and Firefox 102

Additional context

Copy-pasted from Opera's browser console:

FeatherWiki_ruffled-Wren.html:11 Uncaught (in promise) TypeError: a.indexOf is not a function
    at VM6 FeatherWiki_ruffled-Wren.html:11
    at Array.filter (<anonymous>)
    at P._t [as tidy] (VM6 FeatherWiki_ruffled-Wren.html:11)
    at Function.<anonymous> (VM6 FeatherWiki_ruffled-Wren.html:11)
    at R._emit (VM6 FeatherWiki_ruffled-Wren.html:1)
    at R.emit (VM6 FeatherWiki_ruffled-Wren.html:1)
    at l (VM6 FeatherWiki_ruffled-Wren.html:11)
    at Function.<anonymous> (VM6 FeatherWiki_ruffled-Wren.html:11)
    at R._emit (VM6 FeatherWiki_ruffled-Wren.html:1)
    at R.emit (VM6 FeatherWiki_ruffled-Wren.html:1)

(Firefox yields a similar error message, but with less useful context.)

### Describe the problem Trying to import another Feather Wiki file with the big red button in Settings has no effect, and shows an error in the browser console. ### To Reproduce 1. Go to 'Wiki Settings' 2. Click on 'Import & Overwrite With Other Feather Wiki File' 3. Pick a file to open 4. The page title changes, but nothing else ### Expected behavior Import should complete normally. ### Details (please complete the following information) - I am using this build: Ruffled Wren - I am using this version: 1.6.1 - I am using this browser: Opera 78 and Firefox 102 ### Additional context Copy-pasted from Opera's browser console: ``` FeatherWiki_ruffled-Wren.html:11 Uncaught (in promise) TypeError: a.indexOf is not a function at VM6 FeatherWiki_ruffled-Wren.html:11 at Array.filter (<anonymous>) at P._t [as tidy] (VM6 FeatherWiki_ruffled-Wren.html:11) at Function.<anonymous> (VM6 FeatherWiki_ruffled-Wren.html:11) at R._emit (VM6 FeatherWiki_ruffled-Wren.html:1) at R.emit (VM6 FeatherWiki_ruffled-Wren.html:1) at l (VM6 FeatherWiki_ruffled-Wren.html:11) at Function.<anonymous> (VM6 FeatherWiki_ruffled-Wren.html:11) at R._emit (VM6 FeatherWiki_ruffled-Wren.html:1) at R.emit (VM6 FeatherWiki_ruffled-Wren.html:1) ``` (Firefox yields a similar error message, but with less useful context.)
nosycat added the
bug
label 2023-06-20 07:53:04 +00:00

Hi @nosycat, would you be able to share the wiki you are trying to import? I've been able to use the Import and Overwrite button without an issue, i.e. to upgrade the main website.

Hi @nosycat, would you be able to share the wiki you are trying to import? I've been able to use the Import and Overwrite button without an issue, i.e. to upgrade the main website.

Hi @Alamantus, I have the same issue and I suspect that the problem may be in this line of code:
d8473db104/index.js (L36)

// For arrays of strings (like tags) only
FW.tidy = ar => ar.map(v => v.trim()).filter((v, i) => v.length && a.indexOf(v) === i).sort();

'a' is not defined here

Hi @Alamantus, I have the same issue and I suspect that the problem may be in this line of code: https://codeberg.org/Alamantus/FeatherWiki/src/commit/d8473db104c602701d8aa312e44f927e8b6d6591/index.js#L36 ``` // For arrays of strings (like tags) only FW.tidy = ar => ar.map(v => v.trim()).filter((v, i) => v.length && a.indexOf(v) === i).sort(); ``` 'a' is not defined here

Oops, forgot to mention, it's the Tales of Space and Magic wiki. Same as always. Actually, let me attach a copy.

Oops, forgot to mention, it's the [Tales of Space and Magic](https://felix.plesoianu.ro/rpg/tosm-wiki.html) wiki. Same as always. Actually, let me attach a copy.

@strunevsky Oh, good catch, and right you are!! I had moved that from a different file and it looks like I totally missed that.

And thanks @nosycat! I'll definitely be getting a fix out for this ASAP.

@strunevsky Oh, good catch, and right you are!! I had moved that from a different file and it looks like I totally missed that. And thanks @nosycat! I'll definitely be getting a fix out for this ASAP.
Alamantus referenced this issue from a commit 2023-06-21 15:07:57 +00:00

Hey @nosycat and @strunevsky, thanks again for letting me know about this! I got the 1.6.2 release uploaded with the fix, and the website is updated as well.

Hey @nosycat and @strunevsky, thanks again for letting me know about this! I got the [1.6.2 release](https://codeberg.org/Alamantus/FeatherWiki/releases/tag/1.6.2) uploaded with the fix, and the website is updated as well.

Version 1.6.2 seems to work fine. Thank you very much!

Version 1.6.2 seems to work fine. Thank you very much!

Version 1.6.2 works fine for me too. Thank you!

Version 1.6.2 works fine for me too. Thank you!

So, I this problem too and it occurred after I used the update extension to update my wiki on my tiddlyhost account. I didn't create a backup beforehand, I know, rookie mistake. Is there a way to get my info back?

So, I this problem too and it occurred after I used the update extension to update my wiki on my tiddlyhost account. I didn't create a backup beforehand, I know, rookie mistake. Is there a way to get my info back?

Awesome, thanks for letting me know!

Awesome, thanks for letting me know!

@Bearking If you tell me which site it is I might be able to help with the recovery.

@Bearking If you tell me which site it is I might be able to help with the recovery.

Oops, sorry @Bearking, I didn't see your message before posting mine lol. If @sbaird can't help with the recovery, I can do some surgery on your wiki if you're able to get a download of it!

Oops, sorry @Bearking, I didn't see your message before posting mine lol. If @sbaird can't help with the recovery, I can do some surgery on your wiki if you're able to get a download of it!

@Bearking I took a guess which site you're talking about and recovered the previously saved version of it. Take a look at https://tiddlyhost.com/sites and you should see the restored version. The restored version is still FeatherWiki 1.6.0, but I think if you upgrade now using "Import and overwrite" with FeatherWiki 1.6.2 it should work correctly.

@Bearking I took a guess which site you're talking about and recovered the previously saved version of it. Take a look at https://tiddlyhost.com/sites and you should see the restored version. The restored version is still FeatherWiki 1.6.0, but I think if you upgrade now using "Import and overwrite" with FeatherWiki 1.6.2 it should work correctly.

@sbaird I just checked the site you recovered and that is the one I needed. Thank you.

@sbaird I just checked the site you recovered and that is the one I needed. Thank you.
Sign in to join this conversation.
There is no content yet.