Cleanup RW code when removing a stack

what is the best procedure to get a clean code when removing (and replacing) a stack?

I am asking this because I had to replace the prettyPhoto stack by another lightbox stack. When I changed my website to https recently the code from the prettyPhoto trigger is considered as non-secure by a SSL checker. I have now replaced this stack with another one. When checking the source code however the call to the JavaScript of prettyPhoto is still in place.

Maybe there are other leftovers in my RW project. Now I wondering how I could cleanup all my RW projects.

I normally delete everything from my server using an FTP programme and republish everything. Obviously be careful to back up any user content (e.g. databases or content management data).

When I’m developing a site I normally do this as the last step before going live to make sure everything is clean

Dave

1 Like

yes Dave, this is something I usually do as well. But what about the code RW is generating during an export? Depending on your various settings RW will add lines of HTML code into a file and afterwards exporting it to a webserver or a local folder.
And if I replace a stack using a java script library or some js code with another stack also having its js code or a particular js library then RW will add that data to the html file it creates. Now I am wondering what RW will do in case a user deletes a stack? If RW writes a new html file according to the latest edits why is then that call to the old (deleted) js file still within that file.
That’s what interests me.

Ah, no idea on that. I’ve never noticed any code from a deleted stack but I can’t say I’ve looked very hard.

One for the daddy of stacks @isaiah

Dave

every bit of of every file is completely created from scratch each time it is exported. if you remove a stack, it will be removed entirely without leaving anything behind. this is a non-issue – don’t give it a single moment of extra worry. :smiley:

as @davehughes says… the only issue is with residual files on your server.

RapidWeaver plays it safe and doesn’t remove any* files – but just overwrites things when it must. this leaves the job of removing unused files from your server when they need to be (sometimes it’s a benefit to leave them – it really is up to you as the web-administrator to decide).

  • there are a couple of caveats – rw will ask when it detects both an index.php and index.html, and can remove one or the other if you give RW the go-ahead – it was a common problem that used to result in a lot of confusion.

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