EditWrx Knowledge Base Home
 Search       Login   Register   Members   Help   Home 
Search by username

EditWrx Knowledge Base > Open End User Forum > Block Editing > Includeblocks - not saving to associated ssi

Includeblocks - not saving to associated ssi
 Moderated by: Keith  
 New Topic   Reply   Print 
AuthorPost
cybecom
Member
 

Joined: Sun Aug 28th, 2005
Location:  
Posts: 13
 Posted: Sun Aug 28th, 2005 08:26 am
 Quote  Reply 
Hi!

I suspect it is something related to my system setup and possibly the server rather than editwrx....

I have set up some include files (and told the webserver what file extension to use for ssi's).  I have then added an appropriate Includeblock and ssi call (as per your instructions and an example follows).

<DIV includeblock=
"1">
    
<!--#include virtual="/Testing/Headline-Text-Top.htm" -->
</DIV>

The includes work fine and come up on my web page. BUT, when I go to edit the web page that is using the includeblocks and ssi calls, it only saves the content changes NOT in the includeblock. 

The way I understand it is that if you use an SSI within an includeblock, any changes to that SSI when being edited in a calling web page should be saved.  And then any other web pages that happen to call that SSI will also see the updated changes.

So whilst editWrx happily edits the SSI block in a web page,  when I press the Save button, it reverts the SSI back to the original version. ie. It isn't saving the changes.

Does anyone have any ideas on where my set up is going wrong?

Thanks in advance.

Michelle

cybecom
Member
 

Joined: Sun Aug 28th, 2005
Location:  
Posts: 13
 Posted: Sun Aug 28th, 2005 08:56 am
 Quote  Reply 
Hi again.

Well - I've solved my problem and it seems to be related to paths.  Because I was testing editwrx, I created a sub-directory off my main site called Testing and copied the entire site into there. It was this Testing site that I was using with the Includeblocks and SSI.

It seems that editwrx wants to save the changes to the SSI blocks into the root directory. So when I saved the file, it saved it into the root but reloaded it from my Testing sub-directory (hence the original pre-saved file being re-displayed).

To compound my issue, I had switched from calling the includeblocks by the virtual path to the filename to 1,2,3 and 4 and when I looked in the home directory, I could see filenames there called 1,2,3 and 4. This was the clue to what was going wrong.

I can workaround editwrx wanting to save SSI changes back into the root directory and I have followed the instructions verbatim for naming the includeblocks. Eg.

<DIV includeblock=
"/Headline-Text-Top.htm">
   <!--#include virtual="/Headline-Text-Top.htm" -->
</DIV>

I guess now all I ask is, Is it a bug in editwrx that it wants to save SSI's back to the root directory or is there another setting somewhere that I need to change to fix that.

I should point out that I also made the change to the user setup profile for the user editting the page so that it had Editing Mode, Block Editing only set. Somewhere, the documentation says that if you are using SSI's with Includeblocks, you must make sure that change is made.

Thanks

Michelle

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 583
 Posted: Sun Aug 28th, 2005 04:49 pm
 Quote  Reply 
a sub-directory off my main site called Testing
I assume that means that your SSI file is actually at http://some.com/Testing/Headline-Text-Top.htm

Therefore you need to use the VIRTUAL path to that file. The virtual path would be

/Testing/Headline-Text-Top.htm

So your includeblock should look like:

<DIV includeblock="/Testing/Headline-Text-Top.htm">
    
<!--#include virtual="/Testing/Headline-Text-Top.htm" -->
</DIV>


A virtual path is not something we invented, it is an HTTP1.0 standard otherwise known as a Document URI. A virtual path begins with a slash and is the path from the directory containing the website's home page to the file.

When writing to a regular file EditWrx simply replaces the http://theDomain.com (HTTP_HOST) with the DOCUMENT_ROOT to find the full machine path to the file. When writing to an SSI EditWrx appends the path you have in the includeblock value to the DOCUMENT_ROOT to find the full machine path to the file.

cybecom
Member
 

Joined: Sun Aug 28th, 2005
Location:  
Posts: 13
 Posted: Sun Aug 28th, 2005 09:23 pm
 Quote  Reply 
Keith

Hi there... thanks for the reply.

I tried that path system originally (and it didn't work) before changing the includeblock back to using any naming convention.  The only way I seem to be able to get it to work is if I only use the root folder.

By the time I got to the above point though, I'd worked out all the other issues, so was quite happy to put it into the root folder anyway with the live site.  So it's working.

Next website I use it on, I'll see if I can replicate the issue.

Regards

Michelle

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 583
 Posted: Mon Aug 29th, 2005 03:09 am
 Quote  Reply 
Ok Michelle, you've talked me into it. :-)

Tonight's update 6.04.050828 contains a change for includeblocks. An includeblock value may now use either a virtual path OR a full http URL.

<DIV includeblock="/Testing/Headline-Text-Top.htm">
     <!--#include virtual="/Testing/Headline-Text-Top.htm" -->
</DIV>


and

<DIV includeblock="http://some.com/Testing/Headline-Text-Top.htm">
     <!--#include virtual="/Testing/Headline-Text-Top.htm" -->
</DIV>

will both point to the same place so either contruct can be used. That should make it easier for people not familiar with virtual path URIs.

cybecom
Member
 

Joined: Sun Aug 28th, 2005
Location:  
Posts: 13
 Posted: Mon Aug 29th, 2005 05:28 am
 Quote  Reply 
Keith

Cheers... I'll check it out on the next site (may be a little way off) and let you know how it all goes.

Cheers

Michelle


 Current time is 05:33 pm




Powered by WowBB 1.62 - Copyright © 2003-2004 Aycan Gulez