Droplets question

Are there any limitations on placing the Droplet stack on the page - specifically, is it OK to place it at the top of the Partial that’s placed at the top of each page, or does it need to be outside of a Partial?

Reason for the question is that I tried it inside a Partial, but it only displayed correctly on certain pages, just showing the {{banner-tagline}} on others, even after clearing Cache.

I’ve now taken it out of the Partial, and it works fine, so maybe something to look at with @isaiah?

Droplets are already essentially mini-partials on their own.

Are you trying to place the Droplet stack in the Partial or the {{droplet}} tags in the Partial? A screenshot (and a cup of coffee) might help me decipher it this morning. :wink:

If it is just the stack, I would encourage you to not place that in a partial. It is an innocent looking stack, but it does a some crazy stuff. This is why it needs to be the very first thing at the top of your stacks page. Since there are no settings in it, it shouldn’t really need to be in a Partial anyway.

I’ve taken the Droplet stack out of the Partial and it works perfectly now.

I was just being lazy with the Partial, so I didn’t have to drag the stack to each page!

Now I know it’s Partial-like, I won’t try it again (but I bet I won’t be the only person to try it). Curious that it worked fine on some pages, but not others, despite that particular Partial always being top of the page. :man_shrugging:

1 Like

Cool, glad it is working for you. Jamming that stack into a Partial could do weird things I suspect.

Basically that stack causes the page to stop outputting content to the browser, and jams it all into a special variable, which I search through and look for {{droplet}} tags to replace. I replace them and then spit the_whole_ of the variable’s contents back out to the browser. Putting that in a Partial might be troublesome.

Might be worth sticking a warning in the Documentation, when (if) you get a minute… :grinning:

1 Like

I’m not sure I understand the situation. Usually partials don’t affect much. They’re just sort of a fancy UI around a One Column Stack (just our secret, don’t tell anyone, OK?)

In edit mode the Partial editor doesn’t bring along all of the styles from the rest of the page – only the styles of the things inside the partial. That makes editing a partial feel nice and fast, but sometimes causes trouble with frameworks that like to include a lot of styles in one stack.

If there’s something that I can do to help out, just let me know. If there’s a bug I should look at, just package up the page – just with the troublesome stack, leave everything else out. Then send it over to me, or share it here, or whatever works for you. :smiley:

Isaiah

Nothing for you to worry about. The Droplets stack just needed to not be in a Partial, so problem solved!

1 Like

As I mentioned above, partials shouldn’t really affect things.

Can you explain why/how a partial is affecting this stack?

Perhaps I’m not seeing the bigger picture, but at least to me, this sounds like a bug that needs to be resolved, not something that needs to be dismissed.

Hi Isiah,

The Droplets stack needs to be the very first element on the page, as it parses the {{droplets}} used on the page. Being lazy, I put it as the first stack in the Partial that sits at the top of each page on my site, thinking that would save me dragging it to the top of each page.

It worked on some pages, but not others - same pages each time - just displaying “{{banner-tagline}}” rather than the intended text content of the droplet. 7 page site (see? LAZY!). Didn’t work on pages 1-4, but 5-7 were fine. Nothing particularly different between those that worked / didn’t work… :man_shrugging:

Sadly, I’m not sure I can add much value to an investigation, other than to say that I’m happy with Adam’s caution not to put this particular stack in a Partial (Accepting, rather than Dismissing), as I have no technical knowledge of how the Droplet stack does it’s magic, or how Stacks creates the page, using Partials.

I’m sure Adam can explain the workings, and why the combo might cause an issue, though. I’m happy to package up the Project, if that would be of value, given that the droplets are stored on the Server as MD files?

OK. yep. this definitely seems like a bug now. that should definitely work. partials shouldn’t have that sort effect on anything.

is it possible to get a copy of the broken project – if you still have a copy. or even a copy of the working project – i think i can put the droplets stack back into the partial myself.

or is there someone else who can help me set up a super simple Droplets project??? the simpler the better!!! so even a two page project with a few stacks on each page would be fine – but it needs to show off the problem

whoever reads this and can help out, here’s how to share the project with me:

https://yourhead.zendesk.com/hc/en-us/articles/360033849994-Sharing-Your-Project-and-Add-ons

when i have both of those things mentioned in the link above, i can probably fix this one and allow everyone to “be lazy” (i.e. do a lot less work) with these things forever. because after all, being lazy (i.e. doing a lot less work) is what partials are all about!

to me, it sounds like one of the files needed for the script to work is not being exported correctly. this wouldn’t be a huge surprise since we worked hard to optimize the way partials export content to make theme much faster. every change carries a risk of introducing a bug – and that optimization meant a lot of big changes.

oh, and @jacksona – if you can’t provide a file, i understand. but i still want to say an extra big thank you to you for providing the detailed description of what you saw.

you already have! that’s exactly the sort of description that helps get a bug hunt going. there’s still a ton of work to be done, but this is where it all starts: from users noticing something strange – and letting me know.

Thanks again,

Isaiah

1 Like

Hi Isiah,

I’ve recreated the project from my working version, and you have mail.

Best,

Adam.