Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Problem with empty transclusions #7767

Closed
AnthonyMuscio opened this issue Oct 4, 2023 · 2 comments · Fixed by #7768
Closed

[BUG] Problem with empty transclusions #7767

AnthonyMuscio opened this issue Oct 4, 2023 · 2 comments · Fixed by #7768

Comments

@AnthonyMuscio
Copy link
Contributor

Describe the bug

In a new tiddler, with preview/output on, Entering something followed by an empty transclusion {{}} (not the backticks used here) will generate a loop which appears to transclude the current tiddler text a large number of times.

  • "Because the current tiddlers text transcludes the current tiddlers text"?
  • A second copy of the same line in the same tiddler may result in a loss of the wiki stored in browser memory with an "Awe Snap" error.
  • Something similar can occur when using automatic braces eg {{ with create the closing pair and if preview output is open trigger this error. Please see the talk.tiddlywiki discussion

Expected behavior

an empty transclusion would be expected to result in no output because there is no tiddler to transclude.

Previously we may have expected {{}} to transclude a tiddler with no title and not work.

  • We needed to indicate the currentTiddler was to be used with {{currenttitle||template}} or {{||template}}

If you use the below instructions to reproduce but only include {{}} and nothing else you will see the red message Recursive transclusion error in transclude widget

To Reproduce

  1. Go to '.tiddlywiki.com'
  2. add a tiddler
  3. type the word something followed by {{}}
  4. Close and view or open preview > output

Screenshots

Snag_69eaad6

Snag_69ebe9d

TiddlyWiki Configuration

  • Version [v3.5.1]
  • Not applicable, Tiddlywiki.com and Empty.html
  • Plugins installed as per tiddlywiki.com and empty.html (none)

Desktop (please complete the following information):

  • OS:Windows 11
  • Browser FireFox / Chrome
  • Version 118.0.1 (64-bit) / Version 117.0.5938.150 (Official Build) (64-bit)

Smartphone (please complete the following information):

Not tested

Additional context

My suspicion is the default content on the shortcut transclude now defaults when empty to "transclude current tiddler" rather than to an "empty template tiddler title", this is not surprising given the 5.3.x changes.

@Jermolene
Copy link
Owner

Thanks @AnthonyMuscio there's a fix in #7768, I'd appreciate if you could test the preview.

@AnthonyMuscio
Copy link
Contributor Author

Please see comments of mine after testing #7768 partial resolution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants