Jump to content

Sascha Nos

  • Posts

  • Joined

  • Last visited

Posts posted by Sascha Nos

  1. @adrian, the reason is: CI/CD deployment. Steps:

    1. Creating a new migration via RockMigrations in git (module is included in whole website git)
    2. Updating the module version in  git
    3. Pushing the changes
    4. CI/CD is automatically building and creating a new docker container
    5. With start of the container, refreshing should be done automatically which then automatically executes the migration

    My problem: I can automate the refreshing via php cli, but the execution of the migrations is only handled when calling the website via a GET call. When pushing the refresh button in processWire backend, refreshing AND migration upgrading is executed.

  2. 3 hours ago, teppo said:

    Based on the Modules class it looks like module versions are checked by Modules::checkModuleVersion(), which gets called when individual modules are initialized (Modules::initModule()). From here on I'm largely guessing, but what I'd probably try first would be iterating over all modules (assuming that you want this to occur for all of them) and then calling something along the lines of...

    if ($modules->isInstalled($module_name_or_class) {

    ... for each of them — first check is just to make sure you don't accidentally install all modules, while get should trigger upgrade check (if I'm correct, that is) 🙂

    Sounds a little hacky, not sure if it'll work 100% or if there's a more straightforward way. I couldn't spot one, though.

    @teppo, nope – does not work 😞. I now did it by calling the website with a curl request. If there's another idea, let me know :). Thank you so much!

  3. 2 hours ago, flydev 👊🏻 said:

    Ok I understand better your issue, I don't have time to test it, but something to try is :

    AddHookAfter Modules::refresh to call upgrade($fromVersion, $toVersion)

    "This method should make any adjustments needed to support the module from one version to another."


    If you give a try, please report back as I am curious now 😄


    @flydev 👊🏻, the upgrade is already handled by the refresh; but it is not executed 🙂

  4. @flydev 👊🏻 , thank you – but this does not help with the issue. The upgrading is handled identically with wire shell; but the execution is only done after reloading the website via browser (without doing the module refresh via pw api nothing would happen). Any other solutions on that?

    Happy holidays! Sascha

  5. Hey there,

    is there any possibility to execute upgrading of a module with a php command after doing a modules refresh outside admin (e.g. via terminal)?


    For now this is only happens after reloading the application via browser.


    Thanks! Sascha

  6. On 7/22/2020 at 11:54 PM, sebr said:

    I created a module and I use the auto-update system from RockMigrations (0.0.1.php). All is OK with the install and the uninstall. I create a 0.0.2.php and update the version of the module ('version' => '0.0.2'). But when I refresh modules from Processwire, my module update in 0.0.2, but no RockMigrations is executed.

    Hey there, experiencing the same issue. Is there any solution?

    Thank you so much! Sascha

  7. For me, it looks like, adding to property repeaterFields does not work correctly. Changed it to the following:

    $repeaterFieldIds = [];
    foreach($fieldsArray as $field) {
      $repeaterFieldIds[] = $this->fields->get($field)->id;
    $f->repeaterFields = $repeaterFieldIds;


  • Create New...