bernhard Posted July 7 Author Share Posted July 7 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/'; }; ย 1 1 Link to comment Share on other sites More sharing options...
bernhard Posted July 28 Author Share Posted July 28 v7.0.0 removes the hideFromGuests() feature and moves it to the dedicated RockGatekeeper module:ย ย 1 Link to comment Share on other sites More sharing options...
erikvanberkum Posted August 15 Share Posted August 15 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 More sharing options...
bernhard Posted August 15 Author Share Posted August 15 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 More sharing options...
erikvanberkum Posted August 16 Share Posted August 16 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now