Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Migrating a Site to Silverstripe /

What you need to know when migrating your existing site to SilverStripe.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CSVBulkLoader


Go to End


14 Posts   8280 Views

Avatar
Yakiv

Community Member, 59 Posts

23 July 2009 at 12:14pm

Edited: 23/07/2009 12:15pm

Though no one is responding here, I noticed that the StaticImporter plugin was massively upgraded yesterday (I am downloading from SVN). Wow! I am checking it out now, on a local install. ...I see some logical steps here now and something about wget. Ironically, I just came across wget yesterday too, before I saw it here in the plugin! It must have been meant to be! :-)

Hope the documentation starts to churn out too! Thanks to the developer on the work!

Avatar
Yakiv

Community Member, 59 Posts

23 July 2009 at 1:13pm

Edited: 23/07/2009 1:16pm

I am using XAMPP on a Windows Vista 32 Bit machine, with a local install of SilverStripe. I even have the virtual machine set-up, so that I access my SilverStripe at http://silverstripe.loc/ . Pretty cool, eh? My own SilverStripe (local) domain!

I just downloaded Wget 1.11.4-1 from the following:

http://gnuwin32.sourceforge.net/packages/wget.htm

It installs (by default) in the following directory:

C:\Program Files\GnuWin32

At the following:

http://silverstripe.loc/StaticImporter/

I see:

Step 1
Download

And then I see:

Site URL: http://

However, this does not appear to be a real field to enter the domain.

Then I see the button:

Download site using wget

But when I press the button, I get the following error message:

Website Error
There has been an error
The website server has not been able to respond to your request

I am hoping someone knowledgeable about StaticImporter will respond. Maybe the developer?

Avatar
Yakiv

Community Member, 59 Posts

23 July 2009 at 5:02pm

I am looking at the following code in /staticimporter/code/StaticImporter.php:

	// STEP 1

	/**
	 * Downloads a website using wget.
	 */
	function doDownload() {
		$url = self::$url;
		if(!$url) {
			trigger_error('StaticImporter URL was not set.', E_USER_ERROR);
		}
		
		// Create the accepted extensions argument to pass to wget
		$accepted = array();
		foreach(self::$allowed_extensions as $extension) {
			$accepted[] = "*.$extension";
		}
		$acceptedTxt = implode(',', $accepted);
		
		if(!file_exists('../assets/staticimport')) {
			mkdir('../assets/staticimport');
		
			$command = "wget -r -nH --directory-prefix=../assets/staticimport -A "
				. escapeshellarg($acceptedTxt) . ' '  . escapeshellarg($url);
			echo "<p>Running $command</p>";
			exec($command);
		
			echo "<p><b>Done!</b></p>";
		} else {
			echo '<p><b>Site already downloaded.</b></p>';
		}
	}

I see the command for wget. I am able to use wget my self, with command line. I have successfully downloaded and processed a couple sites using the regular windows Command Prompt. However, I want to use the StaticImporter as it is intended. So, I am wondering, is there a config setting in the plugin, so that it knows where the local wget is?

In my case, I have two installations of wget now:

C:\Program Files\GnuWin32\bin\

C:\Wget\

The first was with the Windows installer version (already mentioned) and the second was with the standard version here:

http://www.christopherlewis.com/WGet/WGetFiles.htm

Avatar
Yakiv

Community Member, 59 Posts

2 August 2009 at 3:53pm

It's been 10 days since I last posted and again no one is responding. ...Hoping someone will take interest in this thread. Hoping the developer (sminnee? or aoneil?) of StaticImporter will keep enhancing the module. No updates since July 22nd (and it is presently August 2nd) and no posts here either. Here is the page on the wiki, where documentation should be:

http://doc.silverstripe.com/doku.php?id=StaticImporter

It would be great if one of the developers, such as sminnee? or aoneil?, would fill all of the documentation out, so that we can use this great and promising module! Thanks!

Avatar
Yakiv

Community Member, 59 Posts

28 August 2009 at 2:39am

I have tried the August 12th SVN update for the StaticImporter. I am so happy to see the improvements and continued development on this module! Is there a way that I could communicate with one of the StaticImporter developers, to get some questions answered? I still don't see any documentation done for this plugin, on the wiki and no one is replying on the forums, with help on how to use this module. So, if someone would be willing to communicate by e-mail, that would be fine too. Please help! I am loving SilverStripe, but I need help on this module. Thanks!!! :-)

Avatar
JeremyW

Core Development Team, 4 Posts

28 August 2009 at 10:33am

Heya,

I've posted a bit of info on StaticImporter over at http://www.silverstripe.org/migrating-a-site-to-silverstripe/show/261977?showPost=267797

Hopefully this sheds a bit of light!

Cheers

Jeremy

Go to Top