Support

  1. hatbe7
  2. Support
  3. Tuesday, October 18 2016, 09:51 AM
Hi,

is there a way to disable the jsn update_trigger plugin (I used the skeleton plugin) during import to avoid being notified on any change that was caused by the mass import.

I build below function which i call before and after the import but stillreceive the notifications. I verified that the plugin status gets correctly updated in database but seems like the actual setting is not queried when saving the data to the tables.


private function change_component_status($component,$type,$folder, $enabled)
{
$db=JFactory::getDbo();
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('enabled'). ' = ' . $enabled
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('type') . ' = '. $db->quote($type),
$db->quoteName('element') . ' = '. $db->quote($component),
$db->quoteName('folder') . ' = '. $db->quote($folder)
);

$query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
return;
}


Appreciate any advise
Accepted Answer
admin Accepted Answer
Admin
Hi,
is there a way to disable the jsn update_trigger plugin (I used the skeleton plugin) during import
Nope, but you add a check URL parameter to understand if registration comes from Import plugin:


public function triggerProfileUpdate($user,&$data,$changed,$isNew){
$app = JFactory::getApplication();
$input = $app->input
if( $input->get('view','') != 'import' ) {
/* HERE YOUR CODE */
}
}

if url is like index.php?option=com_jsn&view=import then the code will be ignored.
  1. more than a month ago
  2. Support
  3. # Permalink


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.