Skip to main content
Inspiring
May 13, 2024
Answered

Snippets not displaying in Author view

  • May 13, 2024
  • 10 replies
  • 2645 views

I have a RH 2022.3.93 file with a large number of Snippets. The vast majority were created in a previous version of RoboHelp before categories were available to help organize snippets. Therefore, they do not have a category assigned.

 

Previously we were able to view the list of snippets in the Author window. Now we see only the default category, with no snippets.

 

Snippets are still there and still work correctly. This appears to be a display issues only. If we type a snippet name in the search box, the snippet name is displayed. If we add a category to a snippet, it is also displayed. Given the number of snippets that we have (>3600), manually adding each to a category is not a quick fix.

 

Any idea why these are no longer displayed?

    This topic has been closed for replies.
    Correct answer amie68

    I have resolved this issue - snippets are now displayed as expected in the snippet pane.

    Actions taken to resolve:

    • Installed update 4.
    • Located the last version of snippetcategories.xml in source control that included all snippets. 
    • Replaced the corrupted version of snippetcategories.xml with the clean version from source control.

    Thanks for pointing me to that snippetcategories.xml file. Once I knew that held the info that controlled how these were displayed, it made my troubleshooting much easier.

    10 replies

    Community Expert
    May 22, 2024

    With source controlled projects, it might also be worth manually checking out all files before opening a project in an new version of RH. This would ensure all files are writable immediately, in case there was some lag or network glitch when RH was trying to check out individual files, causing some corruption.

    amie68Author
    Inspiring
    May 22, 2024

    I can see this when using Sharepoint - used to use that platform for source control. We use Azure Repos now, and files aren't checked out. You pull to get changes when you open, commit and push when done. Just throwing that out there for folks who use a source control that doesn't check out files.

    Inspiring
    May 14, 2024

    What you see in the snippet panel is controlled by the snippetcategories.xml file in /settings.

    Snippet categories were released buggy on arrival in update 3 (https://community.adobe.com/t5/robohelp-discussions/error-in-new-snippet-categorization-with-2022-3/m-p/14200952#M151786).

    It used to add everything to categories, not only snippets (e.g. images). This should have been fixed in update 4 (https://helpx.adobe.com/robohelp/kb/fixed-issues.html) but your snippetcategories.xml file might have become an unrepairable mess by now, especially if you work with others in git.

     

    I recommend re-making that file. I'm not sure if RH reconstructs a snippetcategories.xml file if you delete it, though.

    As usual, you can fix most things with code if all else fails:

     

    import os
    from bs4 import BeautifulSoup

    # add paths to your snippets and your snippetcategories.xml file
    snippetlist = 'C:\\Users\\XXX\\Documents\\GitHub\\RH\\Projects\\XXX\\contents\\assets\\snippets'
    snippetcategories = 'C:\\Users\\XXX\\Documents\\GitHub\\RH\\Projects\\XXX\\settings\\snippetcategories.xml'

    rootXML = '<?xml version="1.0" encoding="utf-8" ?><categories></categories>'
    firstsoup = BeautifulSoup(rootXML, 'xml')
    soup = firstsoup.find('categories')

    categories = ['default']

    for category in categories:
        category_tag = firstsoup.new_tag('category')
        category_tag['name'] = category
        soup.append(category_tag)

    default_category = soup.find('category', attrs={'name': 'default'})

    for snippet in os.listdir(snippetlist):

        snippet_tag = firstsoup.new_tag('snippet')
        snippet_tag.string = f'../contents/assets/snippets/{snippet}'
        default_category.append(snippet_tag)

    with open(snippetcategories, 'w', encoding='utf-8') as file:
        file.write(str(firstsoup))

    amie68Author
    Inspiring
    May 14, 2024

    I saw the post you referenced above and wondered if the issue we are having is related. 

    Thanks for the info. I am going to update to version 4 first, then move to an update of the snippetcategories.xml file.

    Takes some coordination to get all team members to upgrade so that we are on the same version and have a deadline to meet in another project, so this likely won't happen today. Didn't want a lack of response/progress from me on this to make it appear that I am not following up. 

    Thanks for this info - I appreciate the time you've taken to help me with this.

    Peter Grainge
    Community Expert
    May 13, 2024

    With you. 

     

    Try Update 4. It might just fix something. 

     

    If not try deleting the .rh folder and reopening the project.

     

    After that, I think it is one for Support. See https://helpx.adobe.com/contact/enterprise-support.other.html#robohelp for your Adobe Support options. The email link tcssup@adobe.com is recommended as it reaches a team dedicated to Technical Communication Suite products including RoboHelp.

     

    Let me know the outcome. 

    ________________________________________________________
    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
    amie68Author
    Inspiring
    May 13, 2024

    Thx for your help. Have to jump to something else and will tackle again tomorrow. Will let you know the outcome.

    Peter Grainge
    Community Expert
    May 13, 2024

    Correct me if I'm wrong but it seems the issue is they are not getting pulled out of source control. 

    ________________________________________________________
    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
    amie68Author
    Inspiring
    May 13, 2024

    No, they are being pulled from source control. I can access them in the RH file if I do a search in the snippet pane.

    This is how the pane displays when I open the file - with only 7 snippets displayed.

    If I enter something in the search box, snippets matching the search criteria are displayed.

    Peter Grainge
    Community Expert
    May 13, 2024

    How many Snippets in source control? 

    ________________________________________________________
    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
    amie68Author
    Inspiring
    May 13, 2024

    All Snippets present in source control.

    Peter Grainge
    Community Expert
    May 13, 2024

    That is the one I was thinking about. It is a slightly different problem but close enough. That is the only report I have seen.

     

    My guess is that the source control is involved. Have you tried taking a complete new copy?

     

    In File Explorer go to your project and look in Assets > Snippets. Are all your Snippets showing in the folder? Are they in Source Control as well?

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
    amie68Author
    Inspiring
    May 13, 2024

    Snippets are displayed in Assets > Snippets in file explorer and in source control.

     

    Deleted local files and got a new copy from source control. Slight change after doing that - 7 snippets display in snippet pane/default instead of none. Still 3,000+ that aren't displayed.

    Peter Grainge
    Community Expert
    May 13, 2024

    Something is nagging me that someone else saw this. Try searching the forum using the lower of the two search boxes. I'll see what I can find in the morning, it's evening here.

     

    It might be worth applying Update 4. If I am right, maybe that will fix it. 

    ________________________________________________________
    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
    amie68Author
    Inspiring
    May 13, 2024

    I found this one, but looks like the person who submitted didn't work through to resolution.

     

    Why does the Snippet Category I've assigned to all... - Adobe Community - 14083103

    Peter Grainge
    Community Expert
    May 13, 2024

    Old snippets automatically were assigned to default.

    ________________________________________________________
    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
    Peter Grainge
    Community Expert
    May 13, 2024

    I misunderstood. 

     

    Are saying that if you toggle the Default label they still do not show? 

     

    If that is not the problem, a screenshot would help. 

    ________________________________________________________
    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
    amie68Author
    Inspiring
    May 13, 2024

    Yes, when we toggle the default label, there are no snippets displayed even though there are >3,000 in this help file. These previously were displayed under the default label.

    Peter Grainge
    Community Expert
    May 13, 2024

    Take a look at the RoboHelp Tour on my site in the 2022 section. How Snippets work now is described there. Come back if you have further questions. 

     

    BTW Update 4 is available. 

    ________________________________________________________
    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
    amie68Author
    Inspiring
    May 13, 2024

    Thanks, we use Snippets extensively and are comfortable with how they work. My question is why they were displayed in the Snippet panel the last time we opened a file and are not displayed there today.

    amie68Author
    Inspiring
    May 13, 2024

    To add to this ... when the file was converted to RH2022, all snippets were assigned to the default category. Now, they have no category assigned. I'm sure that's why we don't see them in the snippet window - but how did that happen, and is there any way to do a mass maintenance of snippets to assign them to a category?

     

    We use Azure Repos for source control - I can see in the version history for the snippet files that there has been no mass change to files to indicate that someone manually did this.