Search code examples
csswebsmalltalkpharoseaside

Problem Uploading CSS File to Seaside FileLibrary


I am a beginner to Seaside and am currently working through the Dynamic Web Development with Seaside book/tutorial. I'm currently at chapter 17.4, where I need to upload a .png and a .css file to a FileLibrary I created.

I tried uploading them through the Seaside configuration page. The .png uploaded and is working fine. However when I tried the .css file, Seaside gave me this: Error: Improper store into indexable object.

I tried uploading the file programmatically as they demonstrated, and it appeared to work at first, but I noticed it was not displaying and the source code didn't show any references to it in the tag in the browser. When I investigated the file in Pharo, in the method, it was returning as nil.

If anyone can provide and explanation as to why this isn't working, I would really appreciate it. I don't know if it will help but here is the stack trace from the error:

Stack Trace
thisContext
ByteString(Object)>>error:
self
'...etc...
thisContext
ByteString(Object)>>errorImproperStore
self
'...etc...
thisContext
ByteString>>at:put:
self
'...etc...
thisContext
WriteStream>>nextPut:
self
a WriteStream
thisContext
[ :writeStream | | readStream | readStream := aString readStream. [ readStream atEnd ] whileFalse:...etc...
self
a GRPharoPlatform

Solution

  • You may have hit the same problem as described in this github issue, but similar stack traces have popped up with earlier versions of Seaside in Pharo 7. So, first make sure you are using the latest stable version of Seaside (see load instructions for Seaside in Pharo). Unfortunately, if you load from the Pharo catalog, you are not using the latest stable version.

    If you still have the same problem: a .css file should have been detected as a text file and the issue is not the same. Please submit the issue to the issue tracker such that we can reproduce the problem.

    In the meantime, I suspect the problem to be in the web tools and you could circumvent the problem by uploading the file programmatically:

    YourLibraryClass addFileAt: 'yourfile.css'