Import data object from other notebook breaks weirdly

Suddenly, the import of a data object from another notebook breaks in a very weird way.

When I:

import {mieke} from "@martien/block-quote"

…and inspect mieke I get:

Object {quotee: "Mieke Gerritzen", url: "", blocks: Array(5)}

While the source mieke does not even have blocks, but is:

mieke = ({
  quotee: "Mieke Gerritzen",
  url: "",
  primer: "blue",
  quotes: [

Even one of the very first revisions (v7) shows this behaviour (now at v730), so going back in time doesn’t show correct notebooks anymore.

Chrome and Firefox show same behaviour, so it seems a server side issue.

What does work is:

Some kind of caching bug?

When I look at @martien/block-quote I see the object mieke with ‘blocks’. Are you sure you republished your latest version with the newer definition of mieke?

Ah, maybe that’s the problem. I continue to see the blocks, even while it has long been changed to quotes in my unpublished version. Until this morning everything went fine, though, seeing the quotes rather than blocks version.

When I logout, I also see blocks.

When I login, (again) I continue to see blocks rather than quotes. So there seems some kind of sync issue.

Hmmm… I logged back in and now only see the blocks version. quotes version seems gone. I’m baffled. Will look into it tomorrow again. It’s Sat eve now. Leisure time.

I fixed it by copying in the data verbatim. Works again.

Still funny that I had been successfully chipping away with probably stale or cached data.

I was under the impression that when logged in, imports import the most recent stuff from other notebooks owned by you. So, still no closure in my head…

There is one scenario that you may be running into that could explain what you were seeing.

Consider 2 notebooks, A and B, with B importing something from A.
You publish A (Av1) and continue editing it. B will see the most current version of A.
Now, if you publish B (Bv1), you only see the published version of A (Av1) to ensure that you and your visitors all see the same thing (and of course your visitors should not see the non-published version of A).

If you republish the most current version of A (Av2) then Bv1 would see the values in Av2.

If you unpublish B, then B will see the latest version of A (Av2 or even later).

I hope that makes sense and that it explains what you have seen.

1 Like

Hi Cobus,

Thanks for your consideration.

If I understand you correctly, in short, you’re saying that every revision of B (published or not or even unpublished) will always see the most recent published version of A, no matter how many unpublished revisions A may have after its latest publication.

Then again, what I have seen is that B was seeing yet unpublished data from A, for quite a while. Then, suddenly, it started showing the latest published data from A, causing B to break because it was using the newer data.

AFAIK, I never unpublished B or republished A. In fact A was already several revisions further after its latest publication, and B was happily using the new data structure from A. All of a sudden, B fell back to the latest published revision of A.

Anyway, I may have forgotten something and may have goofed somewhere during my path to enlightenment. I fixed it now and it works fine.

Thanks again for your time and brain power to power mine.