Jump to content

RockMigrations ๐Ÿš€๐Ÿ”ฅ The Ultimate Automation and Deployment-Tool for ProcessWire


bernhard

Recommended Posts

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
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

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.ย 

ย 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

@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.ย 

Link to comment
Share on other sites

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...