Page 1 of 1

Renaming plugins

PostPosted: Wed Jun 21, 2023 5:42 pm
by pricerc
If I've previously exported/imported a plugin from one database to another (from dev to live), and then decide that I want to give it a new name, will the rename propagate through to the target database when I repeat the export/import ?

I've got a bunch of them that I'd like to rename... related to a naming convention that's no longer working (as well as it once was).

Re: Renaming plugins

PostPosted: Wed Jun 21, 2023 5:44 pm
by pricerc
related question:

If I translate a plugin from VB to C#, will that also propagate?

Re: Renaming plugins  Topic is solved

PostPosted: Wed Jun 21, 2023 5:48 pm
by Mike.Sheen
pricerc wrote:If I've previously exported/imported a plugin from one database to another (from dev to live), and then decide that I want to give it a new name, will the rename propagate through to the target database when I repeat the export/import ?

I've got a bunch of them that I'd like to rename... related to a naming convention that's no longer working (as well as it once was).


Yes - the RecID (SY_Plugin.RecID) is exported into the XML file. and when we import the first thing we do is try and find a plugin already with the RecID - if we find one, then we read that existing plugin and then we update it from the XML file contents.

pricerc wrote:If I translate a plugin from VB to C#, will that also propagate?


No, we ignore the language property when updating a plugin from XML. Why? Because we wanted to avoid the expectation that it would magically perform a code conversion.

Re: Renaming plugins

PostPosted: Wed Jun 21, 2023 5:56 pm
by pricerc
Mike.Sheen wrote:No, we ignore the language property when updating a plugin from XML. Why? Because we wanted to avoid the expectation that it would magically perform a code conversion.


Fair enough.

I wouldn't be doing this at scale, just as major work happens for individual plugins where the switch is helpful.

So would it import, just with the wrong language and allow me to change it manually?

Re: Renaming plugins

PostPosted: Wed Jun 21, 2023 6:23 pm
by Mike.Sheen
pricerc wrote:I wouldn't be doing this at scale, just as major work happens for individual plugins where the switch is helpful.

So would it import, just with the wrong language and allow me to change it manually?


If by manually you mean by using a SQL query such as UPDATE SY_Plugin SET Language = x WHERE Name = y then ,yes - that'll work... but there is no user interface field you can interact with to change the language of a plugin, because we didn't want to... set the expectation that magical language conversions would occur.

Re: Renaming plugins

PostPosted: Wed Jun 21, 2023 6:27 pm
by pricerc
Mike.Sheen wrote:
pricerc wrote:I wouldn't be doing this at scale, just as major work happens for individual plugins where the switch is helpful.

So would it import, just with the wrong language and allow me to change it manually?


If by manually you mean by using a SQL query such as UPDATE SY_Plugin SET Language = x WHERE Name = y then ,yes - that'll work... but there is no user interface field you can interact with to change the language of a plugin, because we didn't want to... set the expectation that magical language conversions would occur.


hmmm. I supposed there is also the "Export to SQL" option...