Procedure calls

In these examples I can see you are using the : which must mean you are using the <<procedurname>> or short form.

  • In the short form the above are not even valid in the legacy macro’s
  • To pass the values you suggested;
    • You must use the macrocall widget for macros /
    • or the <$transclude $variable="my-procedure" date=... form for procedures

I too have being investigating procedures;

From a functional perspective, it appears proceedures are somewhat simple and even more restrictive;

  • First you must
    • Use the new pragma
    • Call with the cumbersom
      • <$transclude $variable="my-procedure" rather than;
      • <$macrocall $name="my-procedure"
  • You gain the automatic transfer of parameters to variables
    • But you could do this before with a set/let or vars in the “macros”
  • You loose the macros substitutions of $(varname)$ and $paramname$
    • And while we now have the new backtick forms they can only be used as parameters to other procedures/widgets/html
  • Regarless of these deficentcies we do gain a lot more in 5.3.0 that will make up a lot for these, although many also work in macros.
    • Functions and custom operators
    • Custom and redefined widgets
      • Including the slot and fill so you can design widget that wrap content.
    • Substitute operator
    • The Parameters widget
    • We can still use the triple curly braces “filterd transclusion”.

Personaly I would like to see;

  • A more symantic way to call procedures like <$proccall $name=procname..

My own understanding is continuing to improve and TiddlyWiki is still a work in progress.

Have a look if $:/core/ui/PageTemplate is one of them?

You can use the transclusion widget for every macro, procedure and function call now, which “unifies” the mechanism. But – The macrocall-widget works fine with procedures too.

\procedure test() some text

<$macrocall $name="test" />

Basically every thing which can be activated with <<something>> can be activated with a transclusion or a macrocall now. This gives us the possibility to update the existing TW UI without compatibility problems.

1 Like

@pmario no that is not one of the overwritten shadows listed. $:/core/ui/PageTemplate is, but i reverted back to the original and no behavior changed. None of the other overwritten shadow tiddlers look as obvious as that one does.

Is there a debugging techinique that I could use to narrow this down?

Can you make a copy where you munge the text and descriptions? It’s really hard to diagnose at arm’s length.

You could do something along the lines of:

A) Disable each plugin installed to see if the problem is fixed by disabling one of them.

B) If not, then:

  1. Make a copy of the wiki
  2. Use the Adv Search filter tab to export all the overwritten shadows.
  3. Delete those tiddlers.
  4. If that fixes the problem, bring the shadow overwrites back in chunks until the problem comes back.
  5. Repeat 1—4 until you find the cause(es)

C) If that doesn’t work, repeat steps 1—5 with all remaining system tiddlers

Thanks @Brian_Radspinner, I was just about to start doing that.

If all else fails, I can remove most of the copyrighted content and make it available.

All,

I removed all added plugins and deleted all overwritten shadow tiddlers, but the problem persists.

I have created a tiddlyhost site without the copyrighted content: https://kansasrailroads.tiddlyhost.com/

I hope all can reach it. If not, please let me know. This is the first time I’ve used tiddlyhost.

I have a tiddler that contains the procedure called Date to String Conversion. It is currently tagged with $:/tags/Global. This is the failing state. If you change it to $:/tags/Global/View, then a date shows up in the Example Tiddler.

Hopefully, someone can take a look at this and help solve the problem. If nothing else, this allows me to showcase my Kansas Railroad TW without the copyrighted contains (which is approximately 1700 railroads).

By the way, there are many external images missing from this.

Some things I tried. https://kansasrailroads.tiddlyhost.com/#%24%3A%2Fcore%2Fconfig%2FGlobalImportFilter - I changed this filter to just [all[shadows+tiddlers]tag[$:/tags/Global]!is[draft]] and it did not help.

I added the tag $:/tags/AboveStory to your Example Tiddler and it did not help (I thought maybe getting rendered from a different part of the pagetemplate might help).

The only thing I found which did help is opening the Example Tiddler in a new window. There the convertdate procedure is rendered fine.

Which tiddlers in your example wiki are demonstrating this and what macro procedure etc is not working?

These two tiddlers. $:/tags/Global doesn’t allow the date conversion procedure to be detected.

[Date to String Conversion ]
[Example Tiddler]

Solved it;

After going through each step I realised it should work, and the tiddlers tagged are imported in $:/core/ui/PageTemplate, which is used, unless it was replaced with an alternate layout, ctrl-shift-L showed me this was so. Selecting the original it now worked.

Solution:

  • You need to ensure your new layout is also importing this and depending on when it was created and which tiddlers were involved you may be better rebuilding the custom layout based on 5.3.0 tiddlers.
  • The cause ? the alternative layout was most likely developed in an earlier version of tiddlywiki based on an older version of $:/core/ui/PageTemplate and as a result the “new features” are not included.
2 Likes

Delete the tiddler: $:/Layout or replace the content with $:/core/ui/PageTemplate

@TW_Tones, @Brian_Radspinner, good find.

While clicking through his wiki, I had noticed tiddlers always moved to the top after clicking the links. I should have realized this page template I shared was being used:

Maybe TW release notes should always mention when PageTemplate is modified in that version. To give the user a hint they should review any custom layout/pagetemplates they have.

Yes, in fact for some of these a version=tw version when last modified we could detect when a possible issue may arise. My old custom layout based on 5.2.5 would clearly be superseded by 5.3.0

Also when I clone a core tiddler I record the source-tiddler

So is the fix as simple as adding

\import [subfilter{$:/core/config/GlobalImportFilter}]

to the top of PageTemplate link click move to top?

Or am I missing some subtleties?

In: PageTemplate link click move to top

Replace

\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]

with

\import [subfilter{$:/core/config/GlobalImportFilter}]
2 Likes

Thank you all very much. It didn’t even occur to me to look for a different layout. I had totally forgotten that I had installed it.

1 Like

Yea, That’s why this type of issues are so hard to find. – But with the power of the community and a “nice catch” from @TW_Tones we probably all learned something :wink: