Snippet: repository issue

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Dave Gehman
Posts: 575
Joined: Sat Sep 23, 2017 9:05 pm

Snippet: repository issue

Unread post by Dave Gehman »

Having trouble making a content snippet from a repository. I'm thinking it might be something to do with the XML in the snippet source, which is a topic in an H+M repository created per your documentation & attached to the project into which I want to place the link to the snippet contents.

When I try a Snippet link from the repository using the Copy and Paste into text, an error message pops up: "Cannot insert object."

Here's the Write editor output when Snippet-ed as a link:
Image

And XML behind it:

Code: Select all

<topic template="Default" lasteditedby="DaveDell" version="2">
  <title>BaseAssembly</title>
  <keywords>
    <keyword>BaseAseembly</keyword>
  </keywords>
  <body>
    <header>
      <para styleclass="Heading1">BaseAssembly</para>
    </header>
    <para styleclass="Body Text"></para>
    <para styleclass="Body Text"><snippet src="AutoDox::baseassembly" inline="false"/></para>
    <para styleclass="Body Text"></para>
    <para styleclass="Heading2"></para>
  </body>
</topic>
Here's the XML of the source:

Code: Select all

<topic template="Default" lasteditedby="DaveDell">
  <title translate="true">BaseAssembly | Base Library docs</title>
  <body>
    <header>
      <para styleclass="Heading1"><text styleclass="Heading1" translate="true">BaseAssembly </text></para>
    </header>
    <para styleclass="Normal_table-cell" style="text-align:left; text-indent:0px; margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; line-height:2.50; background-color:transparent; white-space:normal; page-break-inside:auto; page-break-after:auto; border:none; tabstops:none;"></para>
    <para styleclass="Normal_table-cell" style="text-align:left; text-indent:0px; margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; line-height:2.50; background-color:transparent; white-space:normal; page-break-inside:auto; page-break-after:auto; border:none; tabstops:none;"><text styleclass="table-cell" style="font-family:Arial; font-size:12pt; font-weight:normal; font-style:normal; text-decoration:none; text-transform:none; vertical-align:baseline; color:#333333; background-color:transparent; letter-spacing:normal; letter-scaling:100%;" translate="true">Copyright © 2020 by K4.org</text></para>
    <para styleclass="Normal_table-cell" style="text-align:left; text-indent:0px; margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; line-height:2.50; background-color:transparent; white-space:normal; page-break-inside:auto; page-break-after:auto; border:none; tabstops:none;"><text styleclass="table-cell" style="font-family:Arial; font-size:10pt; font-weight:normal; font-style:normal; text-decoration:none; text-transform:none; vertical-align:baseline; color:#333333; background-color:transparent; letter-spacing:normal; letter-scaling:100%;" translate="true"> &#160;(v.0.21.38)</text></para>
    <para styleclass="Heading1" style="margin-top:10px; line-height:2.63; tabstops:none;"></para>
    <para styleclass="Normal" style="margin-top:16px; margin-bottom:16px; line-height:1.31; tabstops:none;"><text styleclass="Normal" style="font-size:12pt; font-weight:bold; vertical-align:baseline; color:#000000;" translate="true">Mixins</text><text styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">: </text><link displaytype="text" defaultstyle="true" type="topiclink" href="assemblyrendermixin" styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">AssemblyRenderMixin</link><text styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">, </text><link displaytype="text" defaultstyle="true" type="topiclink" href="assemblymixin" styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">AssemblyMixin</link></para>
    <para styleclass="Normal" style="margin-top:16px; margin-bottom:16px; line-height:1.31; tabstops:none;"><text styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">The primary building block for most objects. Supports geometric inheritance, children, and render inheritance.</text></para>
  </body>
</topic>
User avatar
Tim Green
Site Admin
Posts: 23157
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Snippet: repository issue

Unread post by Tim Green »

Hi Dave,

The problem is that your snippet contains a snippet that is not available. You need to remove that snippet reference.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Dave Gehman
Posts: 575
Joined: Sat Sep 23, 2017 9:05 pm

Re: Snippet: repository issue

Unread post by Dave Gehman »

Tim Green wrote: Tue Feb 25, 2020 5:32 pm Hi Dave,

The problem is that your snippet contains a snippet that is not available. You need to remove that snippet reference.
The snippet-within-the-snippet being the links to AssemblyRenderMixin and AssemblyMixin?

Code: Select all

<text styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">: </text><link displaytype="text" defaultstyle="true" type="topiclink" href="assemblyrendermixin" styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">AssemblyRenderMixin</link><text styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">, </text><link displaytype="text" defaultstyle="true" type="topiclink" href="assemblymixin" styleclass="Normal" style="font-size:12pt; vertical-align:baseline; color:#000000;" translate="true">AssemblyMixin</link>
Bottom line, a snippet can't contain links to material elsewhere in the repository project?
User avatar
Tim Green
Site Admin
Posts: 23157
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Snippet: repository issue

Unread post by Tim Green »

Hi Dave,

Is it possible that the snippet has the same ID as the place it is being inserted? Some of the code would seem to indicate so. That would be a No-Go.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Dave Gehman
Posts: 575
Joined: Sat Sep 23, 2017 9:05 pm

Re: Snippet: repository issue

Unread post by Dave Gehman »

Tim Green wrote: Tue Feb 25, 2020 6:41 pm Hi Dave,

Is it possible that the snippet has the same ID as the place it is being inserted? Some of the code would seem to indicate so. That would be a No-Go.
One topic ID is "baseassembly" and the other is "BaseAssembly" - same alpha, different capitalization. So if Topic IDs are case independent, they're the same...
User avatar
Tim Green
Site Admin
Posts: 23157
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Snippet: repository issue

Unread post by Tim Green »

One topic ID is "baseassembly" and the other is "BaseAssembly" - same alpha, different capitalization. So if Topic IDs are case independent, they're the same...
Windows is case-insensitive... 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Dave Gehman
Posts: 575
Joined: Sat Sep 23, 2017 9:05 pm

Re: Snippet: repository issue

Unread post by Dave Gehman »

That's it... thanks!

Edited the Topic ID of the recipient topic and the Repository topic happily plopped itself right at the cursor.

I do remember hearing that Topic ID should NOT be edited manually. True? If so, I'll begin concocting a fix.
User avatar
Tim Green
Site Admin
Posts: 23157
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Snippet: repository issue

Unread post by Tim Green »

Dave Gehman wrote: Tue Feb 25, 2020 9:42 pm I do remember hearing that Topic ID should NOT be edited manually. True? If so, I'll begin concocting a fix.
It's fine to edit the ID in the Topic Options tab, then all internal references to the ID in the project are updated when you do it there. That won't happen if you edit it in the source code, so that's not advisable. The only caveat on editing the ID in Topic Options is that any existing external references to that topic -- from other web pages or other projects -- can't be updated and will break.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply