Tiddler content missing from New Window

105 views
Skip to first unread message

TonyM

unread,
Mar 30, 2020, 5:41:26 AM3/30/20
to tiddl...@googlegroups.com
Folks,

[Edited] This problem has being solved, but if you have another approach I would be happy to hear.
[Edit2] Rather than another email,  I think what I discovered about how this works would allow the creation of the following
 one could customise
  • Open in new window template
    • For which one or more can be selected
  • Open in new window (for Print) template
    • Where some css could use style="page-break-inside: avoid" just for printing on common elements like div section table row etc...

I believe this problem has being solved before . Using TiddlyWiki 5.1.21
I have some tiddlers that I open in new window to print to PDF using complex tables and logos etc...

I have since built a fabulous interactive table, a sample of which is below  in edit mode

2020-03-30_20-38-01.jpg


However both Open in new window and Print shows just white?

Anyone know what may be causing this?
  • Should I import variables
  • Include css ?
  • I am really not sure.

Thanks in Advance
Tony

PMario

unread,
Mar 30, 2020, 6:22:24 AM3/30/20
to TiddlyWiki
Hi,
Did you try it with the prerelease. ... I think the "global macros" are missing in a new window.

I think it's this one: Improve compatibility of single tiddler window vs. main window

Which will be part of .22

-m

PMario

unread,
Mar 30, 2020, 6:23:33 AM3/30/20
to TiddlyWiki
Hi,
-m

Mark S.

unread,
Mar 30, 2020, 9:57:25 AM3/30/20
to TiddlyWiki
Maybe you can transclude your edit tiddler into a view template. Then open that tiddler.

This is what I have to do with my own note taking (sticky note sort of thingy) for exactly this reason.

On Monday, March 30, 2020 at 2:41:26 AM UTC-7, TonyM wrote:
Folks,

I believe this problem has being solve before . Using TiddlyWiki 5.1.21

TonyM

unread,
Mar 30, 2020, 11:26:44 PM3/30/20
to TiddlyWiki
Mario then Mark,

Mario, The github item was raise only because of buttons not including their icons, this seems a larger problem. I will test this on the pre-release to see but unfortunately I can't afford to use prerelease, or perhaps even a new release on this production wiki. 

If I could identify the change and use it as a patch on this occasion, or find a work around may be best. I did an upgrade test with no success (notes below).

Mark, 

This tiddler is already a skeleton with only field values and the  ViewTemplate uses another template to display this kind of tiddler.

Transcluding the final tiddler result only transcluding the text and this is empty. perhaps this is a pointer to the problem, perhaps the open in new window and print only transclude the tiddler and do not honor all the other content which is applied by the view page, story  and View template. In a way I need new window to render all except the tiddler container and title/tags/subtitle.


Upgrade test
I tested upgrading my wiki to the prerelease, when I open the result
  • Red Alert: Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser TypeError: $tw.wiki.doesPluginRequireReload is not a function
  • Another Red Alert; You are about to import a tiddler that will overwrite a core module tiddler. This is not recommended as it may make the system unstable
  • Yellow Alert: You are about to import a tiddler that will overwrite a core module tiddler. This is not recommended as it may make the system unstable
And I can't save, or bypass these errors.

Thanks for your help,

Tony

TonyM

unread,
Apr 1, 2020, 8:24:26 PM4/1/20
to TiddlyWiki
Bump

As the prerelease won't work for me in this case I still need to resolve this.

What contributes to the display of tiddlers in the story but is not available when opening in new window?

I can work through the page and view templates to try and identify the gaps or put dumpvariables in a new window to troubleshoot.

However I hoped someone would understand what is involved in rendering the whole wiki but not in new windows.

It is I believe a bug perhaps not fully resolved in the prerelease. Or perhaps I have made a false assumption somewhere.

Regards
Tony

TonyM

unread,
Apr 1, 2020, 8:36:06 PM4/1/20
to TiddlyWiki
Folks,

Actually, I think this issue is when the content in a tiddler is dependant on the viewTemplate and the fields of the tiddler, but is not the result of content in the text field. This method does not work in open in New Window.  

  • If I could display the tiddler in full screen (without the title tags buttons and box, it should be printable.
  • Or perhaps I can clone or modify the Open in new window mechanisium.
Any thoughts?

Regards
Tony

TonyM

unread,
Apr 1, 2020, 9:00:54 PM4/1/20
to TiddlyWiki
Folks,

Unfortunately for me the Open in new window relies on a button that uses message="tm-open-window" which is defined in $:/core/modules/startup/windows.js which is currently beyond my skill level. Especialy in such a system intergrated function.

Here is my research so far, but my solar power is failing

* $:/core/ui/Buttons/open-window
* [[WidgetMessage: tm-open-window]] with no template set
* Mentioned in $:/core/modules/startup/windows.js
** Contains default template $:/core/templates/single.tiddler.window
* Thus the template is $:/core/templates/single.tiddler.window
**In which we see `<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">`
*The Full render process for a given tiddler from $:/core/ui/PageTemplate
**Which uses To render each tiddler  $:/core/ui/PageTemplate/story 
**Uses the $:/config/ui/ViewTemplate
**

I will be back

Tony

TonyM

unread,
Apr 2, 2020, 12:04:38 AM4/2/20
to TiddlyWiki
I found a solution

The Tiddler $:/core/templates/single.tiddler.window is used to render what is seen in the open new window.

The key is the line;
<$transclude mode="block"/>

I have discovered if you change this to

It will display it in the window as a Full Tiddler with the buttons not displaying correctly. The pre-release does display the buttons correctly.

However I also have a special view Template that responds according to an object-type field eg: $:/PSaT/WRRef/viewtemplate
So
{{||$:/PSaT/WRRef/viewtemplate}}
Renders everything which this template would

I see value in with creating new "Open in New Window" buttons with different templates or a selectable template(s), this could include different output types.

So Problem self solved, perhaps because not many tiddlywikians live around my +10/+11 timezone.

I hope the story here helps others in the future.

Regards
Tony

TonyM

unread,
Apr 2, 2020, 12:27:45 AM4/2/20
to TiddlyWiki
Post script

If you have tiddlers that also contain content you want rendered in the Open new window you can restore the transclude statement in $:/core/templates/single.tiddler.window  as follows. Both at once is fine as long as your viewtemplate does not repeat content in the body - why would it?

{{||$:/PSaT/WRRef/viewtemplate}}

<$transclude mode="block"/>

Regards
Tony
Reply all
Reply to author
Forward
0 new messages