liquidfractal

Collabs not compatible with 4.3 Subscriptions

Recommended Posts

Hi @Kevin Carwile,

THere is a conflict between the Collabs app (1.4.3) and the new Subscriptions feature in IPS 4.3.  When Collabs is enabled and I try to create a new (test) subscription, my site throws the following error:

UPDATE `nexus_member_subscription_packages` nexus_member_subscription_packages  SET `sp__url`=(IPS\Http\Url\Friendly::__set_state(array(
   'base' => 'front',
   'seoTemplate' => 'nexus_subscription',
   'seoTitles' => 
  array (
    0 => NULL,
  ),
   'friendlyUrlComponent' => 'subscriptions/1',
   'isInternal' => true,
   'isFriendly' => true,
   '_queryString' => 
  array (
  ),
   'url' => 'https://www.liquidfractal.org/subscriptions/1/',
   'data' => 
  array (
    'scheme' => 'https',
    'host' => 'www.liquidfractal.org',
    'port' => NULL,
    'user' => NULL,
    'pass' => NULL,
    'path' => '/subscriptions/1/',
    'query' => '',
    'fragment' => NULL,
  ),
   'queryString' => 
  array (
  ),
   'hiddenQueryString' => 
  array (
    'app' => 'nexus',
    'module' => 'subscriptions',
    'controller' => 'subscriptions',
    'id' => '1',
  ),
))),`sp_enabled`=true,`sp_price`='{"AUD":{"amount":"100","currency":"AUD"}}',`sp_renew_options`='{"cost":{"AUD":{"amount":"75","currency":"AUD"}},"term":1,"unit":"m"}',`sp_gateways`='*',`sp_primary_group`='18',`sp_secondary_group`='',`sp_return_primary`=true WHERE sp_id=1 
IPS\Db\Exception: Unknown column 'sp__url' in 'field list' (1054)
#0 /XXXXXXX/public_html/system/Db/Db.php(990): IPS\_Db->preparedQuery('/*IPS\\Patterns\\...', Array)
#1 /XXXXXXX/public_html/system/Patterns/ActiveRecord.php(492): IPS\_Db->update('`nexus_member_s...', '`sp__url`=(?),`...', 'WHERE sp_id=?')
#2 [internal function]: IPS\Patterns\_ActiveRecord->save()
#3 /XXXXXXX/public_html/init.php(458) : eval()'d code(120): call_user_func_array('parent::save', Array)
#4 /XXXXXXX/public_html/system/Node/Model.php(2214): IPS\Patterns\rules_hook_ipsPatternsActiveRecord->save()
#5 [internal function]: IPS\Node\_Model->save()
#6 /XXXXXXX/public_html/init.php(458) : eval()'d code(990): call_user_func_array('parent::save', Array)
#7 /XXXXXXX//public_html/system/Node/Model.php(2997): IPS\Node\collab_hook_ipsNodeModel->save()
#8 [internal function]: IPS\Node\_Model->saveForm(Array)
#9 /XXXXXXX/public_html/init.php(458) : eval()'d code(83): call_user_func_array('parent::saveFor...', Array)
#10 /XXXXXXX/public_html/applications/nexus/sources/Subscription/Package.php(261): IPS\Node\rules_hook_ipsNodeModel->saveForm(Array)
#11 /XXXXXXX/public_html/applications/nexus/sources/Subscription/Package.php(258): IPS\nexus\Subscription\_Package->saveForm(Array)
#12 /XXXXXXX/public_html/system/Node/Controller.php(408): IPS\nexus\Subscription\_Package->saveForm(Array)
#13 /XXXXXXX/public_html/system/Dispatcher/Controller.php(85): IPS\Node\_Controller->form()
#14 /XXXXXXX/public_html/system/Node/Controller.php(62): IPS\Dispatcher\_Controller->execute()
#15 /XXXXXXX/public_html/applications/nexus/modules/admin/subscriptions/subscriptions.php(54): IPS\Node\_Controller->execute()
#16 /XXXXXXX//public_html/system/Dispatcher/Dispatcher.php(146): IPS\nexus\modules\admin\subscriptions\_subscriptions->execute()
#17 /XXXXXXX/public_html/admin/index.php(14): IPS\_Dispatcher->run()
#18 {main}

 

Rules is invoked on line 4, and collabs is invoked on line 7.  I can confirm that collabs is the culprit as I can make a subscription no problem when COllabs is disabled.

 

Share this post


Link to post
Share on other sites

I've seen this plenty of times before. It's not actually a problem with Collabs. Collabs simply exposes a problem in the Nexus app.

The problem can be easily be re-created even if collabs is not present:

$package = \IPS\Nexus\Subscription\Package::load($id);
$url = $package->url();
$package->save();

 

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.