Jump to content

RockMigrations 🚀🔥 The Ultimate Automation and Deployment-Tool for ProcessWire


Recommended Posts

Posted

This is really neat and I'm not sure why I didn't have that idea earlier! The filesOnDemand feature now supports callbacks!! 😎🚀

From the docs: Callback Feature

Sometimes you want to prevent the filesOnDemand feature to kick in. For example in the RockInvoice module I have a pdf field that stores invoices, but these invoices are protected from direct download by htaccess.

When I develop locally this leads to time consuming page requests and HTTP error messages that the requested file could not be downloaded. Callbacks to the rescue!

$config->filesOnDemand = function (Pagefile $file) {
  if ($file->field->name === RockInvoice::field_pdfs) return false;
  return 'https://my-live-site.com/';
};

 

  • Like 1
  • Thanks 1
  • 3 weeks later...
Posted

v7.0.0 removes the hideFromGuests() feature and moves it to the dedicated RockGatekeeper module: 

 

  • Like 1
  • 3 weeks later...
Posted

Bernhard, 

As announced in the changelog, I have: âš  BREAKING CHANGES

What the… Compile Error: Cannot declare class RockMigrations\MagicPages, because the name is already in use (line 17 of site/modules/MagicPages/MagicPages.module.php) 

Any quick workaround for this? This site is a new server setup with RockCommerce and RockForms, so nothing of value from the past. 

For now, I have commented out the MagicPages module, which gives me access to the backend again. 

 

Posted
3 hours ago, erikvanberkum said:

As announced in the changelog, I have: âš  BREAKING CHANGES

Hey @erikvanberkum what breaking changes are you talking about? MagicPages have been there for ages and the latest breaking change was really only about removing the hideFromGuests feature which should have nothing to do with the MagicPages feature. It sounds like your system is loading RockMigrations multiple times somehow?

Do I understand you correctly that this is a fresh installation of RockCommerce + RockForms + all dependencies? Not an existing site? No updates or anything else?

Posted

@bernhard

I revisited the issue today. I upgraded from RockMigrations 6.9.0 to 7.0.0, and encountered an error, resulting in the loss of the entire backend. 

Cannot declare class RockMigrations\MagicPages, because the name is already in use (line 17 of site/modules/MagicPages/MagicPages.module.php)

Renamed MagicPages to .MagicPages and the site is workable again. Further investigation into the issue, it seems that the RockMigrations directory somehow got renamed to MagicPages. When I performed the upgrade, I ended up with two RockMigrations once in the directory RockMigrations and one in directory MagicPages. I will not further investigate how that happened. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...