[Juris-M] Word plugin not communicating in Word 2013 for Windows + display issues
I am trying out the new standalone Juris-M and it's working well but the Word plugin is not. I see both the ZOTERO section on the ribbon and the smaller buttons under ADD-INS, but trying to insert a citation with either produces a "Word could not communicate with Zotero" error.
(The plugins were installed by Juris-M).
A separate issue, one that may not be limited to Juris-M: I've noticed a display problem when the plugin is installed that affects the usability of Word even when there are no references in the document. When the plugin in enabled, text selected with the mouse or keyboard is no longer consistently highlighted: it's still selected, as can be verified by changing the font or copy and pasting it, but its gray background disappears as does the floating formatting toolbar that normally appears.
This seems to be a side-effect of the work the plugin is doing in the background every time the selection is changed. I've found a way of fixing it by turning screen updating off and back on in the UpdateRibbon class event handler:
(The plugins were installed by Juris-M).
A separate issue, one that may not be limited to Juris-M: I've noticed a display problem when the plugin is installed that affects the usability of Word even when there are no references in the document. When the plugin in enabled, text selected with the mouse or keyboard is no longer consistently highlighted: it's still selected, as can be verified by changing the font or copy and pasting it, but its gray background disappears as does the floating formatting toolbar that normally appears.
This seems to be a side-effect of the work the plugin is doing in the background every time the selection is changed. I've found a way of fixing it by turning screen updating off and back on in the UpdateRibbon class event handler:
Private Sub UpdateRibbon()
If Not initialized Then
Exit Sub
End If
On Error GoTo ErrHandler
Application.ScreenUpdating = False ' Stop redrawing the window
Dim isCitation As Boolean
Dim isBibliography As Boolean
Call getZoteroFieldAtSelection(isCitation, isBibliography)
Dim hasFields As Boolean
hasFields = documentHasZoteroFields()
If isCitation <> selectionIsCitation Or _
isBibliography <> selectionIsBibliography Or _
hasFields <> documentHasFields Then
selectionIsCitation = isCitation
selectionIsBibliography = isBibliography
documentHasFields = hasFields
ribbonUI.Invalidate
End If
ErrHandler:
ThisDocument.Saved = True
Application.ScreenUpdating = True ' Let the window update again
End Sub
Which OS are you using? (Ah, sorry, Windows - it was nearly cut off in the subject line.) I assume that you have tried reinstalling the plugin to Word via the button in Preferences -> Cite?
https://www.zotero.org/support/word_processor_plugin_troubleshooting#communication_error_or_non-responsive_plugin_buttons
The second thought is that the app name may be an issue. I set this to "Juris-M" in the release, but in some interprocess communications, counterparts expect it to be "Zotero" or "Firefox." I'm not sure if this affects the Word for Windows integration plugin, but I'll shift the name back in a fresh release of the Windows installer. Not sure if it will help, though.
I'll see if I can reproduce the failure. A colleague has a Windows 10 machine, I'll check with that if I can't make things fail on the Windows 8 machine that I have regular access to.
appNames(1) = "Zotero"
appNames(2) = "Firefox"
appNames(3) = "Browser"
appNames(4) = "Minefield"
Changing "Minefield" to "Juris-M" did it and it works perfectly now. Long term you'll probably want to have that value added to the standard release of the plugin.
If Err.LastDllError = 5 Then
With Juris-M those errors will simply be ignored--or, worse, raised in Firefox even when they're produced in the standalone! I don't know if it would be able to produce the appropriate dialogue.If Dir("C:\Program Files\Mozilla Firefox\firefox.exe") <> "" Then
Call Shell("""C:\Program Files\Mozilla Firefox\firefox.exe"" " & args$, vbNormalFocus)
ElseIf Dir("C:\Program Files (x86)\Mozilla Firefox\firefox.exe") <> "" Then
Call Shell("""C:\Program Files (x86)\Mozilla Firefox\firefox.exe"" " & args$, vbNormalFocus)
End If
End If
Looking good so far. The next interesting watershed will be the arrival of Zotero 5.0, which will have a lot of new code that impacts the Juris-M extensions. I've been working on the migration, and most of the hard stuff is done, and I've set it aside for now—I'll resume work on it when the beta is released, and I think we'll be on schedule to adapt to the new sync architecture that will become mandatory shortly after. Touch wood.
First, thanks for creating Juris-M. I love it.
Until this morning, I ran Juris-M and the Juris-M plugin that shipped with Juris-M, without incident. I have Windows 10 and World 2016 (32 bit). Then, this morning, Juris-M warned me that it couldn’t update itself, and advised me to download the latest standalone version. When I downloaded and installed the latest standalone version, I found that the Word plugin could not communicate with Zotero (same error message as Bruce, above).
I tried editing Zotero.dotm to add “Juris-M” in place of “Minefield” in the list of application names. Unfortunately, this change didn’t appear to have any impact on the issue.
Also, I attempted disabiing the default version of the Word plugin that shipped with Juris-M, and instead adding to my Juris-M standalone instance the version of the Juris-M Word Plugin downloaded directly from github today (which was verison 3.5.2.m4). However, when I try to load this version of the Word Plugin into Juris-M, the result is an error message ("The add-on "Juris-M Word for Windows Integration" could not be installed. It may be incompatible with this version of Zotero Standalone.") and the plugin does not load. As a result, I am still using the plugin version that shipped with Juris-M standalone (that’s 3.5.2.SA.4.0.28.7m52820ea77).
As a test, I also installed Firefox on this computer with the standard Zotero plugin, and synced my library (using Firefox’s profile directly, independently of Juris-M). When Firefox is running, the Word plugin appears to interface directly with Zotero in Firefox, as expected. I just can’t seem to get the plug-in to communicate with Juris-M.
Any ideas of things to try?
Thanks,
David
I've been working on a fresh release. If there are problems with the current release (due to a Firefox upgrade?), I can push out the new version a little early. More soon.
In the new version, I've made some changes that greatly simplify the code in law style modules. Before pushing out an update, I'll need to make some changes to the CSL code in existing modules, to make them work with the new configuration. The changes are straightforward, though, and should be done by the end of the day tomorrow.
appNames(1) = "Zotero"
Should becomeappNames(2) = "Firefox"
appNames(3) = "Browser"
appNames(4) = "Minefield"
appNames(1) = "Zotero"
(Or you can add a fifth entry and tweak the add-in to iterate through that as well). Ultimately, it would be great if the standard Zotero plugin could be updated to include jurism by default.appNames(2) = "Firefox"
appNames(3) = "Browser"
appNames(4) = "jurism"