You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

  1. rusasadmins
  2. JCE Editor
  3. Tuesday, 05 November 2019
Hi,
We have a lot of sites and I am trying to figure out how to update profiles without doing it manually on each site.

a) Import JCE Profiles by using a script. I've got one written the inserts the contend of the exported profiles into the wf_profiles table, but it doesn't seem to update the actual profiles. Maybe I missed a part, but would you tell me if editing the entry in wf_profiles should take care of updating profiles? Does the actual profiles XML file need to exist somewhere within the site? I see that sometimes it is saved into tmp but that does not seem consistent across sites.

b) Option B would be to roll our customized JCE Profiles into the installer package. Where do the default profiles exist in the installer?

Any assistance would be appreciated.
Thank you!
Accepted Answer Pending Moderation
To import the profile using an exported profile xml file, try using this in your script:


require_once (JPATH_ADMINISTRATOR . '/components/com_jce/helpers/profiles.php');

$result = JceProfilesHelper :: processImport($file); // where $file is the absolute path to the exported xml profile file.

if (!$result) {
// some error message
}


Please note in the code above I have had to add a space on either side of the :: to prevent this forum's emoji parser from messing with the code.
Just because you're not paranoid doesn't mean everybody isn't out to get you.
  1. more than a month ago
  2. JCE Editor
  3. # 1
Accepted Answer Pending Moderation
Thank you Ryan. It might also help to know where the "Editor Styles" setting in Global Configuration is stored in the database.

These are the two tables I found that seem like they could hold the setting, but I cannot find it:
j__extensions
j__wf_profiles

Thank you!
Michelle
  1. more than a month ago
  2. JCE Editor
  3. # 2
Accepted Answer Pending Moderation
The Global Configuration is stored as a JSON string in the params field of the entry in the #__extensions table with the name plg_editors_jce
Just because you're not paranoid doesn't mean everybody isn't out to get you.
  1. more than a month ago
  2. JCE Editor
  3. # 3
Accepted Answer Pending Moderation
There was an error in my script that was preventing profile params from importing. It is working now. :D

Thank you for your help, Ryan!
  1. more than a month ago
  2. JCE Editor
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!