Skip to main content
Inspiring
July 12, 2012
Answered

How to ignore a missing plug-in?

  • July 12, 2012
  • 4 replies
  • 3609 views

I have two plug-ins A and B.

In plug-in A, it just invoke the interfaces defined in plug-in B. There is no class/implement changes the document data, in other words, it matches the condition descripted in the programming guide "If your plug-in does not store data in documents, you do not need to take any special precautions." .

I saved some documents using plug-ins A and B.

And now, i remove the plug-in A in InDesign. There will be "Missing Plug-ins" warning dialog when opening the documents saved before. It requires plug-ins A. What happened?

I tried to add bellowing code in my B.fr, it doesn't help.

resource DirectiveList(1) {

    {

        {          

            IgnorePlugin

            {

               {   

                  kMyAFirstMajorFormatNumber,

                  kMyAFirstMinorFormatNumber

               },

               kMyAPluginID

            }

        },

    }

};

Did i miss anything?

I tried to set the plug-in A to be ignored in code, but the "Missing plug-ins" dialog appears before the responding kDuringOpenDocSignalResponderService, and in kBeforeOpenDocSignalResponderService, i can no nothing because IDocument* is nil at the monment.

It can be resolved by selecting the checkbox "Don't show again for these plug-ins" on the Missing plug-in dialog at the first time.Is there any i can do that in code?

Any suggestion to ignore the plug-in A in code?

---------------------------------------

PS: the IDML cannot help because there is some customize data in my plug-in B which will be lost if using IDML.

Thanks a lot,

AidySun

This topic has been closed for replies.
Correct answer Manan Joshi

I have never used IgnorePlugin, but this has to be added to the plugin to be ignored. Hence in your case, you need to add it to the plugin A and not plugin B's fr file. The same applies to the ignoretags resource. I would recommend the following

  • Try by adding IgnorePlugin directive to the A's fr file and then test.
  • In order to identify which class or implementation is causing the missing plugin alert, comment out class definitions and implementation definitions one by one and then test. Once identified, add the corresponding classid or/and implementationid to the ignoretags resource and you should be good to go.

One of the above suggestions would work for you.

Note that in order to test always create a new document with the plugin loaded, save it, then remove the plugin and reopen the document. Old documents with absent or different ignore settings may still result in missing alert. In other words even when you have added the ignore functionality to your plugin, the documents created henceforth using the plugin would not show the missing alert, however the older documents would still show the alert.

Hope this helps to get you move ahead.

-Manan

4 replies

Manan JoshiCommunity ExpertCorrect answer
Community Expert
October 16, 2017

I have never used IgnorePlugin, but this has to be added to the plugin to be ignored. Hence in your case, you need to add it to the plugin A and not plugin B's fr file. The same applies to the ignoretags resource. I would recommend the following

  • Try by adding IgnorePlugin directive to the A's fr file and then test.
  • In order to identify which class or implementation is causing the missing plugin alert, comment out class definitions and implementation definitions one by one and then test. Once identified, add the corresponding classid or/and implementationid to the ignoretags resource and you should be good to go.

One of the above suggestions would work for you.

Note that in order to test always create a new document with the plugin loaded, save it, then remove the plugin and reopen the document. Old documents with absent or different ignore settings may still result in missing alert. In other words even when you have added the ignore functionality to your plugin, the documents created henceforth using the plugin would not show the missing alert, however the older documents would still show the alert.

Hope this helps to get you move ahead.

-Manan

-Manan
Participating Frequently
October 16, 2017

Manan,

I don't know if Aidy is still viewing this 5 year old discussion, but perhaps you can help me (an end user, not a developer). Is there a way to remove a reference to a missing plug-in from an InDesign document?

Thanks,

David

Community Expert
October 17, 2017

Hey David,

Apologies i did not look at the date of original posting of the discussion, it popped up in the list of queries so i replied on it. Well for the issue you are facing without any development support on the original plugins, the only way out is opening the document exporting it out as IDML and then re save it as INDD, this is a cumbersome process which i suppose would not be ideal for you. Another thing could be to write a script that does a batch save of INDD files present in a folder, you could find pieces of such a script on the internet and integrate it to get it to work for you.

Hope this helps.

-Manan

-Manan
Participating Frequently
October 13, 2017

I have a similar issue. We regularly get InDesign files from customers that have 3rd party programs. Each time I open one, I have to do a Save As... and overwrite previous. It get's tiring. I want to completely remove and reference to missing plug-ins from all documents. Any thoughts?

Thanks,

David

Community Expert
July 13, 2012

PS: the IDML cannot help because there is some customize data in my plug-in B which will be lost if using IDML.

@AidySun – I'm not a plug-in developer, but writing scripts in JavaScript, so I want to ask if you could implement something in plug-in B that would write the customized data of plug-in B to a string and inject it with the JavaScript method insertLabel("KeyString","ValueString") in the document.

This label information will be stored into IDML and is still present, if you open the IDML in InDesign. Then you could extract the string with the method extractLabel("KeyString") and maybe write it back to plug-in B.

Uwe

AidySunAuthor
Inspiring
July 14, 2012

Thanks Laubender.

What you say can be a practical solution for many cases, but not suitable for my case. Because the  data saved in my plug-in is not independent, it may relate to docboss, workspaceboss or some page items and so on.

The solution i want to find is one that is practical base on the current situation. Just remove the info/data of plug-in A in the document.

E.g. just do some code change in plug-in B and then it can open the document (saved before with both plug-ins A and B) without the missing plug-in dialog.

Thanks,

Aidy

Legend
July 12, 2012

Hello,

I think you need to look at resource IgnoreTags ,kImplementationIDSpace and kClassIDSpace.

P.

AidySunAuthor
Inspiring
July 12, 2012

Thanks for your reply.

In the plug-in A, there are only some UI related things.

Classes:

     kMyDialogBoss

     kMyActionComponentBoss

Implements:

     kMyActionComponentImpl

     kMyDialogControllerImpl

     kMyDialogObserverImpl

No other classes and implements, all of these don't have any ReadWrite().

Of couse i tried to add them in IgnoreTags, but it didn't help.