Bug with Templates and Externals?

I tested a little bit using Templates and Externals. A really great and useful feature, but there might be a bug (or I couldn’t find out how to use it correctly):

When I create an External or a Template, I can save them to the library. So far, so good.

But then I want to delete them from the library:

I can try, but they cannot be deleted. In the first moment they disappear from the library of the project. But now I close the project and reopen it. Now the Templates and Externals I have deleted before will appear again in the library (and they still can be found in ~user/library/…/addons/stacks/externals)

Next problem: When I want to open an External I deleted before (see above) but that is still visible in the library by double click I get the message

“No external found - No file could be fournd for this external. Would you like to convert this item to a Partial or save a new External file?”

It is the same message I see when trying to use a Template.

What is wrong?

1 Like

Tagging @isaiah

1 Like

I had the same issue.
The cause for me was having a few projects opened at the same time.
When I closed all the other projects without saving them & then deleting the external from the working project.
After a restart of RW the external was gone…

Tested it, but I have the problem with only one single project open and after restart

BTW, I just check my external folder & the deleted external is back!

Templates and Externals act like stacks in that they are saved as files to your Stacks folder in the RW plugins folder.
In the same way that you cant (or at least shouldn’t be able to) delete a stack via RW I don’t think you can delete Template or External from within RW.
If you want one gone then right click and select ‘Show in Finder’ and delete it there.

Personally, not being able to delete a file that could be used across multiple projects without jumping through a couple of hoops is NOT a bug but is actually a feature.

PS Before writing BUG in any title for a post just think about things for a bit, this post will stick around for a long long time and if someone searches for ‘Templates’ or ‘Externals’ it’ll come up and the 1st word the user will see is BUG.

2 Likes

Hi Paul,
This might not be a bug, while saving an external, I did not get all the stacks I wanted to include.
So I tried to delete after making the correction.
The only way I was able to do this was to simply right clicked the external that I was trying to delete, then open in finder & only then was able to remove the external. It is not a big issue, just did not think that was the way to do it.

If these post are no help I can remove them…
Sorry

Yes I know how to delete them. The problem is: They come back after reopening the projects / restarting RapidWeaver.

When I delete them in the finder structure, the icon in the stacks library persits (but it is no longer possible to click on “Show in finder”). I cannot imagine that this is a feature.

I try to make a screencast from that to show what happens

I think there is a bug here, are maybe a missunder standing of how to delete externals.

I just ran a quick test.

  1. I created a simple external
  2. I then deleted the external from my project.
  3. right-clicked the external and selected Show in Finder
  4. shutdown RapidWeaver and deleted the external
  5. restarted RapidWeaver and the external is still in the “Externals” library
  6. I can still used the external by dragging it onto the project.
  7. And the what’s strange is that if I right-click and select Show in Finder again it can’t find the external. The ~/RapidWeaverAddOns/Stacks/Externals Directory appears to be empty in Finder, but the External still exists.

2019-08-12_11-00-50

@isaiah?

1 Like

I made a screencast for demonstrating what happens with the Externals library.
You can download the screencast here… (if the video is not shown in the browser, download it to your computer)

There are 3 Externals in the library of the project I used for the screencast:

  • “Blupps” has already been deleted. It is impossible to show it in finder. I can use it in the project, but it will be unpacked after some time in most cases, even after restarting RapidWeaver

  • “External Test Nr. 2” will be deleted by going into the finder structure during the screencast, but will remain in the Externals library. I can use it in the project, but it will be unpacked after some time in most cases, even after restarting RapidWeaver, even after restarting RapidWeaver

  • “External Test Nr. 1” will not be deleted during the screencast, it will remain in the Externals library and can be found in the finder structure. It can be used as intended

I really do not know what I did wrong.

I did find away that seems to work for deleting Externals. Tested it a couple times and it works.

  1. I made sure the external was either unpacked or removed from the project (don’t know if that is necessary)
  2. Right-click and select Show in Finder 2019-08-12_14-58-08
  3. Move the external to the trash
  4. Right-Click The external in the Library again and select Remove From Library 2019-08-12_14-58-49
  5. Now restart RapidWeaver and the external should be gone.

Did you watch my screencast? Tried that during the screencast, didn‘t work as you can see. The button in the library persists. I will move the project file to another computer and see what happens

It is getting more and more strange:

I moved the project to a new and clean user account (where RapidWeaver never had been started), installed Stacks 4 and opened the project: The buttons persists! Of course there is nothing to see in the Addons directory ~/RapidWeaverAddOns/Stacks/Externals, since I had never created an External here before

It can be tricky to delete an external. This is kind of on purpose. :stuck_out_tongue:

You see, you may have some files out there somewhere that are still using these things – in which case??? What would happen?

So…

Partials, Templates, and Externals have some fail-safe features built in. This can be a bit frustrating if you’re really trying to get them to go away.

Failsafe #1: You can’t delete them from inside RapidWeaver.

  • reason: early users were were deleting Externals in one file that they had used in another file – not realizing the consequence. so i took away the ability to delete them perminently.
  • workaround: quit RW. open your add-ons folder. move the external to the trash.

Failsafe #2: Every project that uses an External/Template has a fail-safe copy of that External/Template inside. So, even if you do move something to the trash, it will still come back to life if you’re using it somewhere.

  • reason: this is mostly so that you can send a friend/colleague your RW file without sending the externals/templates too. when the friend opens the file all the externals just behave like partials.
  • workaround: to really get an external to go away you’ll need to completely stop using it.

Failsafe #3: When you try to edit things that should have a file – they’ll make a file

  • reason: everyone wants to edit their templates eventually. :stuck_out_tongue: when you try to edit a template it will ask if you’d like to make an external or partial from it instead. if you had previously deleted this file it may resurrect the file inside the addons folder in order to write your changes.
  • workaround: if you don’t want your change written to a file, use a partial instead. they don’t write to a file.

Even with all those failsafes, all this kevlar bullet-proofing, there are still ways for users to shoot their own toes off. :stuck_out_tongue_winking_eye:

Here is a fun exercise for the pro users out there:

An external that references images keeps a copy of those images inside of itself. But, if you’re very careful, there is at least one very well hidden way to thread the needle of all the protections and manage to delete all of the copies of the referenced image – yet maintain a multiple-time-reanimated copy of a an external that no longer has the images in tact.

This requires that you physically move the external to the trash no fewer than twice – and ALSO – delete all of the copies of this image within the RapidWeaver resources – and THEN – somehow (left as an exercise to the reader) keep using this external in another document.

LOL.

Needless to say, there are a lot of protections. They are there on purpose. And deleting these things is (intentionally!!!) very difficult.

Not every surprising behavior is a bug. :slight_smile: Sometimes those things are there because I’m looking out for you guys. :yum:

That said, if you do find a bug, please let us know. Here is a link to the bug tracker please feel free to have a look or add your own (you’ll have to sign in – just to prevent spammers).

2 Likes

This would be Failsafe #2.

LOL.
I’m writing LOL here – but this time it was literal. I almost spit out my drink when I read this bit.
:joy::rofl::joy::rofl:

I love that it’s surprising that data is somehow maintained – even with intentionally inflicted damage.
LOL

Seriously. Do you guys even know me??? :stuck_out_tongue:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.