Changes in migrator in 3.1.10-RC1 / 3.2.0-RC2

Discussion forum for Extension Writers regarding Extension Development.
User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 23721
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 » Thu Oct 20, 2016 11:30 am

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.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 2303
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 » Fri Nov 18, 2016 12:24 pm

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
Jr. Extension Validator
Posts: 13149
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

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

Post by david63 » Fri Nov 18, 2016 12:43 pm

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 2303
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 » Fri Nov 18, 2016 1:11 pm

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: 16543
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 » Fri Nov 18, 2016 1:33 pm

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: 2303
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 » Fri Nov 18, 2016 1:47 pm

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:

User avatar
Tarantino
Registered User
Posts: 425
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

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

Post by Tarantino » Fri Nov 18, 2016 5:13 pm

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
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4484
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

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

Post by VSE » Fri Nov 18, 2016 10:44 pm

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.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
Dictated but not read.

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 2303
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 » Sun Nov 20, 2016 12:08 pm

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”

Who is online

Users browsing this forum: MarkDHamill and 9 guests

cron