solved Problems When Updating The Aparna Module

derrickhand300
@derrickhand300
9 years ago
1,353 posts
I have a module created using aparna....been working fine for a year now...a few months ago i added a "Google Maps" and "Spell Check" function to the tinymce editor- also been working fine for a few months.
However when updating the Aparna module to the latest release all my custom stuff in tinymce ( when using the text editor in my custom module) disappears in that there are no buttons in the editor for them?
I was not sure which update caused the issue so i started with the sitebuilder update and started working backwards clearing cache and integrity check after each module roll back...everything started working after rolling back aparna.. ( does not make sense top me because my custom module has a custom name and should not be getting updates) There was a template code in sitebuilder I had to edit when installing the customizations- but I bypassed updates to that by adding it on the FTP in the skins folder...any ideas why my custom stuff is disappearing with the aparna updates?
updated by @derrickhand300: 12/22/16 11:55:59AM
brian
@brian
9 years ago
10,149 posts
Aparna is just a module "template" - it does not in any way control the editor, and is no longer even involved with a module you created using Aparna, so Aparna is not the issue.

The TinyMCE editor is controlled by the "form_editor.tpl" file found in the Core -> Templates area.

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
9 years ago
7,791 posts
If you added custom buttons to tinymce editor, then check the form_editor.tpl in both jrCore and jrSiteBuilder as that's where the editor buttons are initialized.

A while back the site builder buttons and the core buttons were synchronized, so it might be that you need to add your buttons back in to that template.
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Thank you guys...I had rolled back the system Core update just prior to rolling back Aparna...so i am sure the system core update is what got me. I will double check and make sure I have saved the template in the skins folder- but same issue with updating the RSS module- custom feeds stopped updating....so i will have to have a look there.
Thanks again
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Seems I cannot update the core without losing the tinymce plugins I have added...any ideas?
michael
@michael
9 years ago
7,791 posts
Depends on how you added the tinymce plugins. How did you do that? If you copied them to the /modules/jr?????? directory, then when a new version of the module comes in, they will be in the old modules version directory so wont be there.
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Yes they are in the tinymce>plugins folder
My thought was that when an update came they would be ok because for example
they have their own folders like "plugins>spellcheck" or" plugins>googlemaps"-my thought was because the new updates didn't have folders with these names that they would be fine ( and left untouched) but now I am thinking the update process replaces the entire tinymce folder.. any ideas how to keep getting updates without losing the tinymce plugins i purchased?
brian
@brian
9 years ago
10,149 posts
Yeah this is not going to work that way, since an "upgrade" moves the entire folder. Instead you are going to have to make a small custom module. First, using Aparna create a new module - say "xxPluginSpellcheck" or whatever.

Then, in the new module directory create a sub directory - i.e.
modules/xxPluginSpellcheck/tinymce

and put the plugin code INSIDE that directory.

Then, modify the module's include.php file and add this line INSIDE the init() function:
jrCore_register_module_feature('jrCore', 'editor_button', 'xxPluginSpellcheck', 'on');

This tells the core that this module provides a custom TinyMCE plugin.

Do the same process for your other plugin as well - that should fix that up for you.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Thanks Brian- thats getting outside my comfort zone.
I thought I had another solution which was
1=back up the tinymce folder on my desktop
2- Update system core
3-reinstall the tinymce folder from back up into the core
But that did not work and i cannot understand why?
My thoughts are that there will be very few updates to tinymce in updates so this could be a work around with each core update...
michael
@michael
9 years ago
7,791 posts
Yeah that should be enough to make it work. did you also alter the:
/modules/jrCore/templates/form_editor.tpl

file to add your plugins to the active plugin list, because that would need to be done too.
(unless you have changed it via the ACP template editor, then it will persist over updates.)
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Thank you Michael!
Yeah that was the problem...I have it saved as jrSitebuilder_form_editor.tpl but forgot that it also had to be changed in jrCore_form_editor also...I just updated the core after changing the template to the skin in FTP and alls working well. Thanks again-I really dont want to lose out on updates :)

Tags