Comments (7)
Thanks for the detailed reply. I will try out your workaround. As in my case datepicker
is being called by another plugin (ToDoNow), I've also opened an issue in the caller plugin.
from tiddlyremember.
Are you sure your wiki is loading properly with both plugins installed, if you do a full reload of the page? At first glance, this doesn't look like anything related to TiddlyRemember, but rather that TiddlyWiki is failing to load your wiki at all with the date-picker plugin installed, and TiddlyRemember is thus unable to sync it.
from tiddlyremember.
Yes, I'm quite sure. I have installed both plugins in TiddlyWiki (Node.js) and there is no error. The error only appears when I try to synchronize it with Anki. But as I said above, if I disable the DatePicker plugin, the error disappears. So my current flow is:
- Disable DatePicker (not to uninstall)
- Synchronize TiddlyRemember in Anki.
- Enable DataPicker again.
from tiddlyremember.
The error didn't happen for me when I merely installed the plugin, but on further investigation it does happen when I include a date-picker widget in a tiddler that TiddlyRemember is rendering. It appears that this is a known bug in the date picker plugin. As I suspected before, TiddlyRemember isn't actually involved here at all, except that it has to render your tiddlers to extract the content and the date picker widget isn't rendering correctly. The reason you don't see this when interactively using your wiki is that the bug only crops up when running noninteractively under Node.js without access to a browser.
So if you really want it fixed, you might visit the thread on that plugin and poke over there, but it sounds like the author of the plugin doesn't know enough about TiddlyWiki on Node.js to fix it themselves, so unless you have that experience, we might be stuck waiting until someone else who does comes along and wants to use the plugin like this!
Workarounds
If you don't ever use a date picker and TiddlyRemember macros on the same tiddler, you could work around the issue by setting the filter in TiddlyRemember's Anki settings to a value that excludes any tiddlers that might end up with date picker widgets rendering within them. You might even be able to do it dynamically by finding the text $edit-date
or some such within the text of tiddlers being considered by the filter.
If you want to use them on the same tiddler, a dumb hack would be to wrap all references to the $edit-date
widget in a $list
widget, like this, such that TiddlyWiki only tries to render the date picker widget if a variable matches a value:
<$list filter="[<myvar>match[myvalue]]">
<$edit-date field="mydate"/>
</$list>
You would then need to make myvar
set to myvalue
somewhere on the ViewTemplate that transcludes tiddlers in the story river, so that your date picker widgets would appear (this would almost certainly require overriding a shadow tiddler). TiddlyRemember uses a custom template, $:/plugins/sobjornstad/TiddlyRemember/templates/TiddlyRememberParseable
, to render tiddlers and search them for notes, so the variable would stay undefined there and avoid displaying the widget when being read by TiddlyRemember.
from tiddlyremember.
(Note to self: in a future version of TR, it might be handy to set a variable within the TiddlyRememberParseable
template indicating that TiddlyRemember is running. Then it wouldn't be quite so ugly a hack if you needed to include conditional logic like this.)
from tiddlyremember.
Another workaround I am playing with is to make shadow tiddlers of offending module scripts and add if (!$tw.browser) { return; }
as the first line under a widget's .render
method (and also in a few other spots that have caused trouble with TiddlyRemember sync). I only use a browser TW so I'm not sure if this would screw up a wiki running on node (I suspect it might), but it gets the job done for my TiddlyRemember workflow, and I can use TR and other widgets without wrapping them as suggested above.
from tiddlyremember.
A variable tr-rendering
will be available in the next release to easily distinguish when TiddlyRemember is running.
from tiddlyremember.
Related Issues (20)
- Auth basic password protected wiki not syncing HOT 10
- 403 error when trying to sync certain images HOT 4
- UnboundLocalError: local variable 'extra' referenced before assignment HOT 3
- Password isn't saved when editing the config of a wiki created from < 1.3.0 HOT 2
- Permalink only links tiddlywiki file, not the full permalink. HOT 7
- Parsing errors should show the name of the tiddler containing the bad markup HOT 1
- Unable to sync/import tiddlers with moderately long titles in cyrillic. HOT 1
- After update to Anki desktop fails to sync Grok Tiddlywiki HOT 14
- Anki tags only appear if the tags exist in tiddlywiki HOT 4
- Better error message if wiki file/folder doesn't exist HOT 1
- Allow syncing to a private Tiddly Host HOT 4
- Katex Chemical equations in Cloze answer not rendering correctly HOT 2
- Equation errors HOT 2
- Optional support for local filesystem images HOT 8
- Feature request: use selected text for cloze HOT 3
- feature request: bidirectional sync; to and from anki
- Avoid media syncing?
- Caught exception: Traceback HOT 1
- TiddlyRemember does not work on Arch Linux HOT 2
- BOB tiddlyremember HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiddlyremember.