0
votes

I am wanting to make some changes to a Silver stripe project that is on a clients server. I want to get the project on my server so I can make changes out of production environment.

What I have tried so far:

  • Exporting mysql database and importing it to local mysql server
  • Install new blank silverstripe project locally
  • Copy and replace all files from clients public_html folder into new local silverstripe project folder.
  • Change mysite/_config.php file to point to new database

When I try silverstripe/project/dev/build/?flush=all I get:

Fatal error: Uncaught exception 'Exception' with message 
'There are two files containing the "ReportAdmin" class:
"/var/www/silverstripe//reports/code/ReportAdmin.php" and 
"/var/www/silverstripe//cms/code/controllers/ReportAdmin.php"

Any help would be greatly appreciated, thanks!

1
Is the project in git? If yes you're lucky. Check it out, run composer instal and sync DB/assets. Does it use composer? If yes, you need composer.json and composer.lock to get all installed modules on your dev machine. For syncing db/assets there is a tool called sspak which might help you - wmk
Unfortunately I was only provided a login to a cPanel hosting service, had to get all the files and exports from there. No composer to help build it, just the files. But through yourself and UncleCheese I managed to get it working! Thanks! - Stefan Orr
ah, those projects without composer are the best ones. You don't know what hidden gems (read: someone changed module's code without documenting it) await you. Therefore it needs to be tested carefully when you switch to composer for managing dependencies. Good luck when updating the code base. - wmk

1 Answers

3
votes

You're running two concurrent installations of SilverStripe. ReportAdmin was broken out into its own module in 3.2. In < 3.2, ReportAdmin was bundled with the CMS.

When you say "Install new SilverStripe project locally" you're probably just using the latest stable. Find out what version the current site is running and install it explicitly, e.g. composer create-project silverstripe/installer myproject/ 3.1.19