Why do they appear
The why stems primarily from Stacks being a plug-in. As a plug-in there are a lot of limitations to how/when we save information to the project file. Sometimes the perfect solution is simply not possible – so we have to choose a solution that’s imperfect, but still safely saves all the project data.
Currently a partial, external, or template that is active when a project file is saved, is saved with that project file. This is an imperfect solution that ensures no data is ever lost.
But it has a side effect: when two project files are open at the same time the partials from one project file can migrate to the other. This has no impact on the published website, of course – but the library latches on to any partials it can find. The net effect is that a project file can increase in size, sometimes quite a bit.
Fixing this perfectly requires a little bit more information about the project when things are being saved than we currently have today. Currently there’s nothing like that in the RapidWeaver API and I don’t really expect there to be any changes on this front.
But there are things in the works. It requires that I really change the foundations of to the way partials work – so these aren’t small things. But I think that it may improve the situation quite a bit.
How to remove unwanted partials
- Open just the one project that you want to remove partials from (to make sure other partials aren’t going to jump across again). If other projects have been open already – or auto open when you start RapidWeaver then just close them, Quit RW and then start a new session from scratch.
- Make sure you’re not using the partial anywhere in your project. If Stacks finds the partial somewhere else in your project, then a “removed” partial will just be hidden for your current session, rather than removed permanently.
- Select the partials in the Stacks Library. You can use shift-click and/or command-click to select many items.
- Choose Remove from Library from the gear menu (or Ctrl-Click and choose it from the pop-up menu).
- Choose Remove from the pop-up warning.
- Save the document. Quit RapidWeaver.
About that warning message
I’ve reworded the pop-up warning message a few times. I think another rewording is still in order – if anyone has suggestions for a short explanation that somehow encapsulates all the info I’ve just written about above, in just a sentence or two, let me know in the comments. I’d be really happy for good suggestions.
The warning currently says, “This will remove the partial from the library but not from your document.”
I guess what I’m trying to get across to users is that if you want the partial to go away permanently, you’ll have to stop using it completely, everywhere within your document BEFORE you remove it from the library. The “Remove from Library” doesn’t ever change your document (and currently can’t – more API limitations, I’m afraid).
Last details
I should note that most of these limitations didn’t exist when Partials were first added to Stacks. RW 7 documents worked quite differently and pages loaded differently. In those days partials did not jump from document to document and removing a partial from the library would ask if you wanted to remove it everywhere in the document. The RW7.5 changes to document loading offered some great improvements, it means only loading the part of the document you’re working on – but they had some serious side effects too, especially for Stacks and things like partials/globals/etc that are designed to work across pages and be part of the document as a whole. Of course I made many pleading requests for tweaks or changes that might allow things to continue working as designed – but, well… here we are.
@isaiah, who other than posts about Black Friday sales has been basically M.I.A. Since last May.
I am still around. I’m working on the next big Stacks release. I’m keeping quiet, but if you have questions I can still be found in the usual places – or well, the usual places other than here.
There are reasons that I don’t hang around the forum anymore. I think many who have followed Stacks over the years can probably read between the lines and know what’s what. Don’t worry, this isn’t about you folks here. But I think that’s probably all I should really say.
I’d be happy to talk more about this in private with anyone that’s curious. You can always hit me up in a Twitter Direct Message or on the Stacks Slack channel.
I do pop in on occasion and answer a question when someone asks me to – but it’s probably best if that’s a limited thing. I hope you understand.
I think in the future I may try to run a Stacks specific server – something that’s community run, so that all developers feel welcome and anyone is free to ask questions, even before they’ve purchased anything. But that’s for another day.