GitHub Enterprise Submodules Not Load

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
dreifsnider
Posts: 105
Joined: Thu Aug 30, 2018 10:06 pm

GitHub Enterprise Submodules Not Load

Post by dreifsnider »

Hi,

I'm experiencing an issue where Web Author does not load the contents of a submodule in either the file browser, or in the Author view with a relative path to a file in the submodule (an image href).

The file structure of the main repository is the following:

Code: Select all

|en
    |users-guide
        |users-guide.ditamap
        |topic1.dita
        |topic2.dita
        |image1.png
        |shared-media <= this is the submodule
            |image1.png
            |image2.png	
In the GitHub file browser, when loading the main repository and navigating to the submodule folder (shared-media), the submodule folder appears empty and no files display.

Additionally, in the Author view when a topic in the main repo references a resource in the shared-media submodule, for example in topic1.dita:

Code: Select all

<image href="./shared-media/image1.png"/>
The actual image is replaced with placeholder image icon.

If it helps, the contents of the .gitmodules file is as follows:

Code: Select all

[submodule "en/users-guide/shared-media"]
	path = en/users-guide/shared-media
	url = <https url to the GitHub Enterprise repo>
I've confirmed that the Web Author option Enable Git submodules support is enabled. Are there any other steps needed to configure Web Author to load the submodule contents?

We need to have images (and possibly xrefs to DITA topics) sourced from a submodule display in the Author mode for our content contributors.

Please let me know if there's any other information I can provide to help investigate.

Thank you!
Daniel
Gabriel Titerlea
Site Admin
Posts: 95
Joined: Thu Jun 09, 2016 2:01 pm

Re: GitHub Enterprise Submodules Not Load

Post by Gabriel Titerlea »

Hello Daniel,

You need to specify a branch for your submodule descriptor.
Either, use ".", to use the same branch as the currently opened file:

Code: Select all

[submodule "en/users-guide/shared-media"]
	path = en/users-guide/shared-media
	url = <https url to the GitHub Enterprise repo>
	branch = .
or specify a fixed branch name:

Code: Select all

[submodule "en/users-guide/shared-media"]
	path = en/users-guide/shared-media
	url = <https url to the GitHub Enterprise repo>
	branch = main
Best,
Gabriel
dreifsnider
Posts: 105
Joined: Thu Aug 30, 2018 10:06 pm

Re: GitHub Enterprise Submodules Not Load

Post by dreifsnider »

Thank you for your reply Gabriel! That worked perfectly, and now both the file browser and the author preview correctly display the contents of and reference to the submodule.

Thanks!

Daniel
Post Reply