docsify icon indicating copy to clipboard operation
docsify copied to clipboard

The 'undefined' word appears sometime

Open Yan-AM opened this issue 7 years ago • 16 comments

Hi,

I'm using version 4.7.0.

Sometime the word 'undefined' appear if it's the first time I'm going on the page.

The text is hidden when I refresh the page.

See picture : issue_undefined

Tested on FireFox 61.0.1.

Thank-you for your Docsify ! Yan

Yan-AM avatar Jul 09 '18 12:07 Yan-AM

Can you please provide an example?

QingWei-Li avatar Jul 09 '18 13:07 QingWei-Li

Yes, this is the 'readme' file where I'have the problem :

# Documentations de nos applications locales

[filename](../applications/alias/doc/readme.md ':include')
* [Documentation utilisateur](http://localdomain.fr/applications/alias/#/utilisateur/readme)
* [Documentation technique](http://localdomain.fr/applications/alias/#/technique/readme)


[filename](../applications/api/doc/readme.md ':include')
* [Documentation utilisateur](http://localdomain.fr/applications/api/#/utilisateur/readme)
* [Documentation technique](http://localdomain.fr/applications/api/#/technique/readme)


[filename](../applications/sec/doc/readme.md ':include')
* [Documentation utilisateur](http://localdomain.fr/applications/secAuto/#/utilisateur/readme)
* [Documentation technique](http://localdomain.fr/applications/secAuto/#/technique/readme)


[filename](../applications/secAuto/doc/readme.md ':include')
* [Documentation technique](http://localdomain.fr/applications/secAutoAutoConfig/#/technique/readme)

## Concernant cette documentation
* [Documentation technique](http://localdomain.fr/applications/documentation/#/technique/readme)

And here, is the config in my page :

<script>
		window.$docsify = {

			name: 'Accueil des applications',
			nameLink: 'http://localdomain.fr',

			homepage: 'readme.md',
			basePath: 'doc/',
			externalLinkTarget: '_self', // Par défaut '_blank'.

			search: {
				maxAge: 60,
				placeholder: 'Recherche',
				noData: 'Aucun résultat'
			}
			plugins: [
				function (hook) {
				  var footer = [
					'<hr style="padding-top: 30px;" />',
					'<footer>',
					'<strong>Documentation</strong>',
					'</footer>'
				  ].join('')

				  hook.afterEach(function (html) {
					return html + footer
				  })
				}
			]
		}
</script>

Thanks, Yan

Yan-AM avatar Jul 09 '18 13:07 Yan-AM

Somes captures.

Before refresh: issue_capture_probleme

After refresh: issue_capture_refresh

Yan-AM avatar Jul 09 '18 13:07 Yan-AM

I experience the same - we have a similar setup. Sometimes, instead of "undefined", it's "filename". An URL where this happens usually: https://www.whiteboxes.ch/docs/tentacle/t1/#/protocols

It takes 2-3 reloads sometimes to load all includes.

extrapixel avatar Oct 31 '18 17:10 extrapixel

@extrapixel fixed in v4.8.2

QingWei-Li avatar Nov 01 '18 05:11 QingWei-Li

@QingWei-Li yeah, seems fixed. @Yan-AM ?

extrapixel avatar Nov 27 '18 17:11 extrapixel

@QingWei-Li yeah, seems fixed. @Yan-AM ?

Actually, it still does not work. A "filename" link appears instead of the include. 1-2 reloads will fix it.

extrapixel avatar Nov 27 '18 20:11 extrapixel

Yeah, experiencing same thing on 4.7.1 and latest.

chrisschaub avatar Dec 09 '18 23:12 chrisschaub

Been trying to reproduce but all seems fine locally. @extrapixel https://github.com/whitebox-labs/whitebox-docs/blob/master/tentacle/t1 this works locally as well.

Could anyone please setup a project that can reproduce this issue?

cheng-kang avatar Dec 23 '18 18:12 cheng-kang

Could anyone please setup a project that can reproduce this issue?

clicking the link (https://www.whiteboxes.ch/docs/tentacle/t1/#/protocols) will reproduce the issue. What do you mean by "locally"? The includes are loaded from external sources (GitHub):

basePath: 'https://raw.githubusercontent.com/whitebox-labs/whitebox-docs/master/tentacle/t1/',

and the links in the markdown are relative: (I guess this is similar to @Yan-AM 's setup. @chrisschaub what about your links - relative? )

[filename](../common/ezo-protocols.md ':include')

resolving to this path (outside the base-path).

https://raw.githubusercontent.com/whitebox-labs/whitebox-docs/master/tentacle/common/ezo-protocols.md

extrapixel avatar Dec 24 '18 02:12 extrapixel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 04 '20 09:02 stale[bot]

this issue is still open. @cheng-kang

extrapixel avatar Feb 04 '20 13:02 extrapixel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 04 '20 13:04 stale[bot]

almost 2 years and this bug is still there

extrapixel avatar Apr 04 '20 21:04 extrapixel

@extrapixel can you share a reproducible sandbox for this using the latest version. it would help a lot in investigating this.

Sorry for this much delayed, this might have missed my eyes

anikethsaha avatar Apr 05 '20 06:04 anikethsaha

I got it whenever I add an external link to my page.

http://example.com

rendered as undefined. Turns out I was using an empty link function that I forgot to override:

<script>
  window.$docsify = {
    name: "Example",
    repo: "",
    markdown: {
      smartypants: true,
      // renderer: {
      //   link: function () {
      //     // ...
      //   },
      // },
    },
  };
</script>

Once commented out (as above) it works.

slhck avatar Mar 16 '23 07:03 slhck