[Seaside] Antwort: Re: Seaside and Pharo 6: Problem with Umlauts?

Dietmar Schielke dietmar.schielke at data-experts.de
Mon Jun 12 14:19:53 UTC 2017


Hi Johan,

many thanks for your answer.

I just downloaded a fresh Pharo-64 install to my MacBook and loaded the 
latest stable  Seaside as described on the Seaside-GitHub page.

Now I can start the server via Seaside Control Panel. Great, thanks for 
fixing it so fast :-)

Then I try to access the servers starting page I get a walk back with 
"Error: Improper store into indexable object".

As I stated in my previous email, the reason is that the used stream does 
not support 
        #nextPutAll: with a Character as argument (and crlf too). 

Thats why WAResppnse>>writeAStatusOn: 
crashes in the first line with
        nextPut: $ ; 

Because I downloaded all freshly without changing anything I can't 
imagine, what I could have done to mess this up.
A have the stack trace atached to this email.
Maybe you have an idea?

All thr best,

Dietmar


ByteArray(Object)>>error:
ByteArray(Object)>>errorImproperStore
ByteArray(Object)>>at:put:
ZdcIOBuffer>>nextPut:
ZdcSocketStream(ZdcAbstractSocketStream)>>nextPut:
WAComboResponse(WAResponse)>>writeStatusOn:
WAComboResponse>>commit
WAComboResponse>>flush
ZnZincStreamingServerAdaptor>>responseFrom:
[ self
        handle: context;
        responseFrom: context ] in 
ZnZincStreamingServerAdaptor(WAServerAdaptor)>>process:
BlockClosure>>ensure:
ZnZincStreamingServerAdaptor(WAServerAdaptor)>>process:
[ :stream | 
| request |
request := ZnSeasideRequest nativeRequest: aZnRequest stream: stream.
super process: request ] in ZnZincStreamingServerAdaptor>>process:
ZnDeferredResponse>>writeOn:
ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>writeResponse:on:timing:
[ self writeResponse: response on: stream timing: timing ] in 
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>writeResponseSafely:on:timing:
BlockClosure>>on:do:
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>writeResponseSafely:on:timing:
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeOneRequestResponseOn:
[ [ self executeOneRequestResponseOn: stream ] whileFalse ] in 
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeRequestResponseLoopOn:
[ activeProcess psValueAt: index put: anObject.
aBlock value ] in ZnCurrentServer(DynamicVariable)>>value:during:
BlockClosure>>ensure:
ZnCurrentServer(DynamicVariable)>>value:during:
ZnCurrentServer class(DynamicVariable class)>>value:during:
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeRequestResponseLoopOn:
[ self executeRequestResponseLoopOn: stream ] in [ [ self 
executeRequestResponseLoopOn: stream ]
        ensure: [ self logConnectionClosed: stream.
                self closeSocketStream: stream ] ] in [ [ [ self 
executeRequestResponseLoopOn: stream ]
        ensure: [ self logConnectionClosed: stream.
                self closeSocketStream: stream ] ]
        ifCurtailed: [ socket destroy ] ] in 
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn:
BlockClosure>>ensure:
[ [ self executeRequestResponseLoopOn: stream ]
        ensure: [ self logConnectionClosed: stream.
                self closeSocketStream: stream ] ] in [ [ [ self 
executeRequestResponseLoopOn: stream ]
        ensure: [ self logConnectionClosed: stream.
                self closeSocketStream: stream ] ]
        ifCurtailed: [ socket destroy ] ] in 
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn:
BlockClosure>>ifCurtailed:
[ [ [ self executeRequestResponseLoopOn: stream ]
        ensure: [ self logConnectionClosed: stream.
                self closeSocketStream: stream ] ]
        ifCurtailed: [ socket destroy ] ] in 
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn:
[ self value.
Processor terminateActive ] in BlockClosure>>newProcess




Von:    Johan Brichau <johan at inceptive.be>
An:     Seaside - general discussion <seaside at lists.squeakfoundation.org>
Datum:  09.06.2017 19:36
Betreff:        Re: [Seaside] Seaside and Pharo 6: Problem with Umlauts?
Gesendet von:   "seaside" <seaside-bounces at lists.squeakfoundation.org>



Hi Dietmar,

Regarding Seaside 3.2 on Pharo 6: You were just ahead of me today. 
There was no stable version of Seaside 3.2 that worked on Pharo 6, until 
now.
If you reload the stable version, you should get a working version.
(There was ongoing work for Seaside 3.3 that included Pharo 6 fixes, but 
it was not finished yet.)

Regadering the changes you had to make and the problems with umlauts: I 
cannot reproduce them.
I suspect there is something you do in your Seaside app that changes the 
Stream class that is used to render.
Which Seaside version did your app work well on?

best
Johan

On 9 Jun 2017, at 16:35, Dietmar Schielke <
dietmar.schielke at data-experts.de> wrote:

Hello Seasiders, 

I just managed to load Seaside  into a Pharo 6.0 image running on MacOS 
Sierra unsing 

Metacello new 
  configuration:'Seaside3'; 
  repository: '
http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'; 
  version: #stable; 
  load. 

Beside starting the ServerAdaptor manually via 
        ZnZincServerAdaptor startOn: 8081. 
because of the missing class NewListModel 

I had to change 
        WAResponse>>writeStatusOn: 
because the used stream does not support 
        #nextPutAll: with a Character as argument. 

So I changeed in #writeAStatusOn: 
        nextPut: $ ; 
to 
        nextPut: $  charCode; 
in two places. 

Furthermore the used stream does not support 
        #crlf 
so I added it to ZdcAbstractSocketStream. 

Now I can open the examples etc. 

That was easy :-) 

Now I tried to deploy an old Seaside App written by me and got "cannot 
parse response" error in my webbrowser (no debugger in the VM). 
I tracked it down to the use of Umlauts (äüö) in the rendered pages. 

As a simple demo of this problem I changed the WACounter example. If I add 
a german Umlaut to the "++" or "--" label I get a "cannot parse response" 
in my browser upon rendering the WACounter expample. 

Is there something wrong with my setup or is it a bug? 
Many thanks for any hints. 

Happy coding, 

Dietmar 


_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20170612/40c8e9e1/attachment-0001.html>


More information about the seaside mailing list