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

transcludsion fails for multiple tiddlers #1

Closed
shadowforce62 opened this issue Feb 9, 2023 · 12 comments
Closed

transcludsion fails for multiple tiddlers #1

shadowforce62 opened this issue Feb 9, 2023 · 12 comments

Comments

@shadowforce62
Copy link

If more then one tiddler is transcluded then it sends the actual transclude Text to the console

Example

{{Hello Tiddler}} (Echo Hello World!)
{{Goodbye Tiddler}} (Echo Goodbye World!)

Tiddler running


@echo off
{{Hello Tiddler}}
{{Goodbye Tiddler}}
Pause

Result:
Hello World!
{{Goodbye Tiddler}} is not recognized as an internal or external command
Press any key to continue.

@welford
Copy link
Owner

welford commented Feb 10, 2023 via email

@welford
Copy link
Owner

welford commented Feb 20, 2023

maybe b0147b0 is a fix, i haven't reproduced the issue locally - your setup works for me. but this should fix a recursive pattern. Are you able to try this commit? I'll build it into my samples maybe tomorrow.

@shadowforce62
Copy link
Author

Now it fails after 3x commands instead of 2. better but not fixed i only imported twexe.js to the HTA file not all .tid's
im currently running TW5.2.5
Screenshot 2023-02-25 224653

@shadowforce62
Copy link
Author

if it helps i can send the TW file im using as an HTA, im also going to try downloading the demo one and updating it to see if its just a tw5.2.5 issue. i have a few other plugins that may/maynot be causing conflicts, im also storing all my "Code Snippets" as plain/txt

@shadowforce62
Copy link
Author

shadowforce62 commented Feb 26, 2023

I think this may help, i've updated twexe.js in the demo page you have online and added 5 transclusions, i've notice a pattern because the first 3 worked instead of the first 2, adding null values ({{nul}}) that points to just :: i was able to get it to read all five lines correctly the more nuls added the more it trancludes. the tiddler looks like this:

created: 20230226035843256
modified: 20230226040609323
tags: $:/tags/twexe
title: Debug
type: text/plain

{{Debug_1}}
pause
{{Debug_2}}
pause
{{Debug_3}}
pause
{{Debug_4}}
pause
{{Debug_5}}
pause
{{nul}}
{{nul}}
{{nul}}
{{nul}}
{{nul}}
{{nul}}
pause

Screenshot 2023-02-25 230717

Side Note: Im using windows 11 and TW 2.5.3 (The Demo Version @ http://welford.github.io/twexe/twexe.plugin.html) with an updated twexe.js file only

Temporary Fix For anyone else with this issue:

Create a new Tiddler named "Nul"
Add :: to the tiddler body
Spam {{Nul}} at the bottom of the script if you use to many it will just add a comment line that will be ignored tested up to five transclusions. cant seem to tranclude more than 5/6

@welford
Copy link
Owner

welford commented Feb 26, 2023

can send the TW file im using as an HTA, im also going to try downloading the demo one and updating it to see if its just a tw5.2.5 issue. i have a few other plugins that

plain text is fine, could you please share a html version of your example? Renaming the hta is fine. thanks!

@shadowforce62
Copy link
Author

inside the zip is the .htm file. look for the tiddler named debug in recent. in my machine the script will execute properly so long as {{Nul}} is appended to the end like so, Delete the nul values and you should see it fail to run transcluded tiddlers
twexe.plugin.zip

@shadowrevenant
Copy link

(Second account, I'm shadowforce62)
Would something kinda like

<a name=<<currentTiddler>>>
<$transclude tiddler="$:/core/ui/ViewTemplate"/>
</a>

Solve this issue? Shot in the dark?

@shadowrevenant
Copy link

Just without the UI part?

@welford
Copy link
Owner

welford commented Mar 11, 2023

sorry for the delay, but cfc4d3c should be a fix for this. Thanks for the sample.

@shadowforce62
Copy link
Author

Awesome, looks like it works just fine I'm piling translations and they seem to work, I can't tell if I'm jumbling my code or not but I'm no longer getting '{{Tiddler}}' not recognized errors. i think its safe to mark this one fixed

@welford
Copy link
Owner

welford commented Apr 8, 2023

thanks i have updated my public wikis with the new plugins.

@welford welford closed this as completed Apr 8, 2023
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

No branches or pull requests

3 participants