Re: Rookie Teething Woes (Saving docs..)
Christian Stocker <[email protected]> Tue, 01 Jun 2004 13:33:35 +0200
| Newsgroups | gmane.editors.bitflux.general |
|---|---|
| Message-ID | <[email protected]> |
Hi
Sorry... Wrong answer ;)
You have to send the 204 or 201 HTTP Status Code.. That's the WebDAV
convention. In PHP, this looks like that:
header("HTTP/1.1 204 No Content");
I'll make a wiki entry and put a sample php script in the repository.
Examples in other languages are welcome, of course ;)
Hope that helps
chregu
On 1.6.2004 13:06 Uhr, Christian Stocker wrote:
>
>
> On 1.6.2004 12:04 Uhr, David Farrell wrote:
>
>> Hi all,
>>
>> I'm new to Bitflux Editor and I'm having a few teething problems,
>> hopefully someone can help!
>>
>> Thanks to the informative post last week that got added to the wiki, I
>> have been able to get 'somewhere' with my Bitflux installation.
>>
>> I'm building a system that will allow users to have inline formatted
>> content (hence Bitflux!).
>>
>> I could do with a couple of pointers...
>>
>>
>> Currently, I have a page that has Bitflux editable content - based on the
>> inlineXHTML example's index.html file.
>>
>> I have stripped away much of the formatting, leaving only the heading and
>> the main body of text.
>>
>> I have 'basic' save ability - when I click save, it does replace the
>> content with the changes the user makes.
>>
>> It saves this into the 'inline.xml' file that I specify via a get-var
>> parameter (?xmlurl=inline.xml)
>>
>> So far, so good.
>>
>> However.. every time I click 'save' I get the following error (inside the
>> 'orange box'):
>> "
>> Document couldn't be saved Something went wrong: 200
>> <html><body/></html>
>> "
>>
>> Now... firstly... why does this error happen when the document IS saving
>> changes?
>
>
> I assume, the solution is pretty simple ;) Mozilla expects an XML
> Document and this has to have the Content-Type "text/xml"
>
> Try adding this header to your save-script. In PHP, you'd add
> header("Content-Type: text/xml");
>
> The HTTP Code "200" has the meaning "OK", so the saving went ok. It's
> just that the response is not "text/xml" but most presumably text/html.
> Actually, this is somehow a "Bug" in BXE, since it's able to load XML
> document with the wrong content-type as of 0.9.4. I'll fix that.
>
> Try it, and if it still doesn't work, just ask again..
>
> chregu
>
>>
>> secondly, I tracked the error declaration to 'bxeFunctions.js' - line
>> 52 -
>> inside function 'callback (e)'.
>> It appears that 'something went wrong: 200' comes from e.statusText
>>
>> how can I debug this? what is a 200 error?
>>
>>
>>
>> Now.....
>>
>> my overall aim is not to have the system save to xml file like this - I
>> need the content to stream to a database.
>> Can anyone point me to some documentation that would help me achieve
>> this?
>> Or, can anyone give me a couple of tips / tricks for doing this?
>> Or, can anyone show me an existing example that I can learn from that
>> does
>> this?
>>
>>
>>
>> I would appreciate any help that anyone could give on all or some of my
>> issues (error or db stuff).
>>
>>
>> Thanks in advance!
>>
>> David
>
>
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | [email protected] | gnupg-keyid 0x5CE1DECB
--
bx-editor-users mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-users