Skip to content

Embeds aren't working #961

Closed
Closed
@robinsowell

Description

@robinsowell

We use embeds to pull in shared content- see

{{embed:fieldtypes/_fieldtype-settings.md}}

They all appear to be broken. See released checkbox page here. The embed content should be under the 'Field Settings' header and it's just blank.

They did work at one point and the format is consistent with what the Docs docs say it should be.

If you run the build script- you'll see a bunch of warnings where it tells you the embeds failed:

Image

So- we need to get it fixed.

I played around a bit- in utility.js is where that error message is generated.

const returnEmbedContents = (match, p1, p2, p3, offset, string) => {	
		console.log("Found Embed: " + p1);
	try {
		embedContents = Fs.readFileSync('./docs/'+p1, { encoding: 'utf8' });
		embedContents = RenderEmbed(embedContents, parentPageInfo);
	  } catch (err) {
		embedContents = "";
		Logger.warn('Unable to embed ' + p1 + ' on page:' + err, parentPageInfo.path, 'Failed Embeds')
	  }
	return embedContents;

I added in the + err bit so I could see the actual error- it's 'TypeError: MarkedJs is not a function' and that's as far as I got.

Locally it could be I need to update something, but since the embeds are missing on the live docs as well, something in the build process needs looking at to get the release working with embeds.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions