Problem with Swiki in 2.2beta

Mark Guzdial guzdial at cc.gatech.edu
Wed Sep 23 13:33:18 UTC 1998


>After rendering some pages (a few dozen times) in a testSwiki, network
>operations on my system stop working.  It appears that Squeak is not
>closing its TCP streams after FTPing the swiki page to the remote server.
>Quiting and re-running Squeak solves the problem.
>
>Is anyone else having problems with RenderingSwikiAction or FTPSocket?
>
>I'm running on a Mac G3 with OS 8.1.
>

I'm not having that problem. I rendered about a dozen pages yesterday.  I'm
running a PowerMac 7600, System 7.6, (actually, now that I think about it,
still with 2.1, but with the 2.2 PWS filed in).  I'm using a
RenderingSwikiAction for my class website
(http://www.cc.gatech.edu/classes/cs2390_98_fall/), and I just did 14 pages
yesterday.

>Also, how many other folks are using PWS on a regular basis?  Would anyone
>else like to have  PWS started automatically?  Perhaps this would be a good
>preference to add to the 2.2beta.  The enclosed change file (762 bytes)
>hard codes the PWS startup.  I'd like to see this (or something better)
>added to 2.2.  Comments?

Of course, I'm using PWS on a regular basis :-)  We have maybe 10 servers
here at Tech running PWS (mostly in CS, but a couple in Architecture, a
couple in Chemical Engineering, etc.).  The PWS mailing list (send
"subscribe pws" to majordomo at cc.gatech.edu) had about 60 members at last
count.

Ross Philipson's Admin Utility (available at
http://pbl.cc.gatech.edu:8080/myswiki) does automatic startup, too.  Ted
Kaehler has also posted some suggestions on the PWS mailing list on how to
get automatic reboot of PWS, as well.  (I don't if those have made it into
the Swiki yet or not.)

I did find a bug yesterday in the RenderingSwikiAction.  References to
*myimage.gif* don't get rendered correctly because I didn't fileout the
version that DID do that correctly <sigh>.  Below is the one method change.
What happens is that we create a temporary SwikiAction when rendering the
page, so that URLs are created correctly.  By naming the SwikiAction '.',
references to images become './myimage.gif' which works just fine if the
image is in the same rendered folder.  So it's really only a one line
addition.

Mark


'From Squeak 2.2beta of Sept 16, 1998 on 23 September 1998 at 9:14:51 am'!

!RenderingSwikiAction methodsFor: 'process and generate' stamp: 'mjg
9/23/1998 09:14'!
generate: pageRef
	"Generate the page to the serverDirectory. Use the render.html page
as a template"

	| formattedPage renderedFile newmap file|
	"Make a copy, then format the text."
	formattedPage _ pageRef copy.
	newmap _ urlmap copy.		" Create a new action with
different action for cached form."
	newmap action: (RendererSwikiAction new).
	newmap action name: '.'.
	formattedPage formatted: (formatter swikify: pageRef text
			linkhandler: [:link | newmap
					linkFor: link
					from: 'Nowhere'
					storingTo: OrderedCollection new]).
	(serverDirectory isKindOf: String)
	ifTrue: [ "Just save the file into the directory"
		renderedFile _ (serverDirectory),(pageRef coreID),'.html'.
		(StandardFileStream isAFileNamed: renderedFile)
		ifTrue: [FileDirectory deleteFilePath: renderedFile].
		file _ FileStream fileNamed: renderedFile.
		file nextPutAll: (HTMLformatter evalEmbedded: (self
fileContents: source ,'render.html')
			with: formattedPage).
		file close.]
	ifFalse: [ "Assume it's FTP and send it off"
		renderedFile _ (pageRef coreID),'.html'.
		(StandardFileStream isAFileNamed: renderedFile)
		ifTrue: [FileDirectory deleteFilePath: renderedFile].
		file _ FileStream fileNamed: renderedFile.
		file nextPutAll: (HTMLformatter evalEmbedded: (self
fileContents: source ,'render.html')
			with: formattedPage).
		file close.
		serverDirectory putFile: (FileStream fileNamed:
renderedFile) named: renderedFile.
		"FileDirectory deleteFilePath: renderedFile"]! !

--------------------------
Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
(404) 894-5618 : Fax (404) 894-0673 : guzdial at cc.gatech.edu
http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html





More information about the Squeak-dev mailing list