Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Discussion forum for Extension Writers regarding Extension Development.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28617
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by Paul »

Tarantino wrote:So, all validated extensions will be fixed by the extensions team? :) Thats sounds fair enough and good news.
No, the extension author will need to fix it and resubmit their extension. We will just accept migration changes if they are using IF statements like explained in the first post.
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6670
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by HiFiKabin »

I am having problems with my Obscure Contact Up ext in 3.1.10.

I have read through both topics about this, and I am no further forward. The migrator thats causing the problem is below. Any ideas how I can fix this? Everything I have tried so far doesn't work.

Code: Select all

<?php
/**
*
* @package phpBB Extension - Obscure Contact Us
* @copyright (c) 2015 - HiFiKabin
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

namespace hifikabin\obscurecontactus\migrations;

class obscurecontactus_1_0_3 extends \phpbb\db\migration\migration
{
   static public function depends_on()
   {
      return array('\hifikabin\obscurecontactus\migrations\obscurecontactus_1_0_2');
   }

   public function update_data()
   {
      return array(
         // Remove the incorrect ACP module
         array('module.remove', array('acp', 'ACP_CAT_DOT_MODS', 'ACP_OBSCURECONTACTUS')),

         array('module.remove', array(
         'acp', 'ACP_OBSCURECONTACTUS', array(
         'module_basename' => '\hifikabin\obscurecontactus\acp\obscurecontactus_module',
         'modes'    => array('main'),
            ),
         )),
         // Add the correct ACP module
         array('module.add', array('acp', 'ACP_CAT_DOT_MODS', 'ACP_OBSCURECONTACTUS')),

         array('module.add', array(
         'acp', 'ACP_OBSCURECONTACTUS', array(
         'module_basename' => '\hifikabin\obscurecontactus\acp\obscurecontactus_module',
         'modes'    => array('config'),
            ),
         )),
         //Update Version
         array('config.update', array('obscurecontactus_version', '1.0.3')),
      );
   }
}
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by david63 »

HiFiKabin wrote:I am having problems with my Obscure Contact Up ext in 3.1.10.
Does it work in 3.1.9? If so leave it until 3.1.11 is out (or apply the PRs) and see if the problem has been resolved
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6670
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by HiFiKabin »

Yes AFAIK it was OK in 3.0.9 (at least no one said it wasn't) The problem is people wanting to install it in 3.1.10 and getting errors.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18282
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by DavidIQ »

Well what exactly is causing the problem? The module.remove section or the module.add?
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6670
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by HiFiKabin »

It is module.remove as the error thrown is:-

Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.

A module already exists:
Tarantino
Registered User
Posts: 874
Joined: Sat Feb 18, 2012 1:51 pm

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by Tarantino »

On my ext, ff i'm not wrong VSE told me to change to this to work:

Code: Select all

<?php
/**
*
* @package phpBB Extension - Obscure Contact Us
* @copyright (c) 2015 - HiFiKabin
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

namespace hifikabin\obscurecontactus\migrations;

class obscurecontactus_1_0_3 extends \phpbb\db\migration\migration
{
   static public function depends_on()
   {
      return array('\hifikabin\obscurecontactus\migrations\obscurecontactus_1_0_2');
   }

   public function update_data()
   {
      return array(
         // Remove the incorrect ACP module
         array('module.remove', array('acp', 0, 'ACP_OBSCURECONTACTUS')),

         array('module.remove', array(
         'acp', 'ACP_CAT_DOT_MODS', array(
         'module_basename' => '\hifikabin\obscurecontactus\acp\obscurecontactus_module',
         'modes'    => array('main'),
            ),
         )),
         // Add the correct ACP module
         array('module.add', array('acp', 0, 'ACP_OBSCURECONTACTUS')),

         array('module.add', array(
         'acp', 'ACP_CAT_DOT_MODS', array(
         'module_basename' => '\hifikabin\obscurecontactus\acp\obscurecontactus_module',
         'modes'    => array('config'),
            ),
         )),
         //Update Version
         array('config.update', array('obscurecontactus_version', '1.0.3')),
      );
   }
}
Best regards

PS: Read this: viewtopic.php?f=461&t=2389746&p=14538996
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5859
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by MattF »

HiFiKabin wrote:I am having problems with my Obscure Contact Up ext in 3.1.10.

I have read through both topics about this, and I am no further forward. The migrator thats causing the problem is below. Any ideas how I can fix this? Everything I have tried so far doesn't work.

Code: Select all

<?php
/**
*
* @package phpBB Extension - Obscure Contact Us
* @copyright (c) 2015 - HiFiKabin
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

namespace hifikabin\obscurecontactus\migrations;

class obscurecontactus_1_0_3 extends \phpbb\db\migration\migration
{
   static public function depends_on()
   {
      return array('\hifikabin\obscurecontactus\migrations\obscurecontactus_1_0_2');
   }

   public function update_data()
   {
      return array(
         // Remove the incorrect ACP module
         array('module.remove', array('acp', 'ACP_CAT_DOT_MODS', 'ACP_OBSCURECONTACTUS')),

         array('module.remove', array(
         'acp', 'ACP_OBSCURECONTACTUS', array(
         'module_basename' => '\hifikabin\obscurecontactus\acp\obscurecontactus_module',
         'modes'    => array('main'),
            ),
         )),
         // Add the correct ACP module
         array('module.add', array('acp', 'ACP_CAT_DOT_MODS', 'ACP_OBSCURECONTACTUS')),

         array('module.add', array(
         'acp', 'ACP_OBSCURECONTACTUS', array(
         'module_basename' => '\hifikabin\obscurecontactus\acp\obscurecontactus_module',
         'modes'    => array('config'),
            ),
         )),
         //Update Version
         array('config.update', array('obscurecontactus_version', '1.0.3')),
      );
   }
}
Use the array-if constructs when removing modules. For example: https://github.com/VSEphpbb/similartopi ... hp#L28-L43

And don't forget to use effectively_installed() methods too.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6670
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Post by HiFiKabin »

Thanks Matt, I'll have to wait for my health to pick up a bit before I do anything else on this
Post Reply

Return to “Extension Writers Discussion”