So here’s the thing: I created a PG project called CanvasSnippets. Canvas is a multi page template and I’m making my own collection of snippets.
So, when I open one template page to save a snippet out of it, I go to Page -> Manage Libraries & Plugins
(I’ve also tried using File -> Manage Libraries & Plugins
), I load and activate my CanvasSnippets.js and my blocks load in the components panel.
I add a few snippets, rename them… and open the next template page. Now, those snippets are gone. I check with Page -> Manage Libraries & Plugins
, it’s listed there but not active. So I go to activate it and I get something like “This thing is already activate it, you have to disable it first”.
Then, I go to File -> Manage Libraries & Plugins
and it’s there activated! But still disappeared from the components panel. So I deactivate and activate again. No errors but still not showing there.
I close the whole project and start again. Now it works. I do a couple snippets and again with the same issue
Worst of all, this time, I go to check on that *.js where the snippets are and they are all gone. There’s only this skeleton:
$(function() {
//Wait for Pinegrow to wake-up
$("body").one("pinegrow-ready", function(e, pinegrow) {
//Create new Pinegrow framework object
var f = new PgFramework("CanvasSnippets", "CanvasSnippets");
//This will prevent activating multiple versions of this framework being loaded
f.type = "CanvasSnippets";
f.allow_single_type = true;
f.user_lib = true
//Tell Pinegrow about the framework
pinegrow.addFramework(f);
var section = new PgFrameworkLibSection("CanvasSnippets_lib", "Components");
//Pass components in array
section.setComponentTypes([]);
f.addLibSection(section);
});
});
Here’s when I realize I can’t trust PG with any file, so thank god I had GIT working from the get go.
So, 1) the library disappearing every time I open a new page is so frustrating, am I at fault here?. 2) PG will just eat hours of snippetting for no apparent reason.
Help?