SnippetMaster Support Forums
Return to main website
 
February 20, 2018, 03:41:41 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 20, 2018, 03:41:41 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  Suggestions & Feature Requests  |  Topic: Preview Hyperlinks after editing a page « previous next »
Pages: [1] Print
Author Topic: Preview Hyperlinks after editing a page  (Read 5565 times)
Roger

Posts: 40


[-] Preview Hyperlinks after editing a page
« on: May 02, 2006, 08:08:54 AM »

A small irritant. (IE6)
When I preview a page and click a hyperlink to another page, the new page is displayed fine if I have put in the correct link, but the browser back button no longer functions. It takes me back to a notice that says the page has expired!
No problem really as all you do is to close that window, but users might get confused!
Can anything be done to fix this Henri?
Roger
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Re: Preview Hyperlinks after editing a page
« Reply #1 on: May 02, 2006, 09:22:23 AM »

When you preview a page, it should open up into a new window.. is it not doing that for you?

Maybe I'm not understanding what you mean?

Report to moderator   Logged
Roger

Posts: 40


[-] Re: Preview Hyperlinks after editing a page
« Reply #2 on: May 02, 2006, 10:08:57 AM »

Yes it does open in a new window, no problem. And then, when I click on a link in the page to check it out, it dashes off to to the new URL very nicely, but it leaves the Back button still available (IE6 at least). When I do press the back button, however, I get to the 'Page Expired' message rather than back to the original file in the new window (instinctive expectation).
Roger
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Re: Preview Hyperlinks after editing a page
« Reply #3 on: May 02, 2006, 10:27:42 AM »

Oh.. I see what you mean now.  I just tried this out myself and yes.. it shows the "page expired" message and then says you have to resubmit the info to display it, etc..

The reason this is happening is because of how the preview page is created.  I'm not sure I can get around this, because basically what's happening is the data inside the editor is "submitted" to the program, and then displayed in a new window.

So the window contents are created from a 'form submission' (from the editor).  The reason you see that "page expired" message is because the browser recognizes the page was created by submitting a form.. and so it automatically thinks the page is outdated and asks if you want to "resubmit" the form contents to redisplay the page.

Phew. Kind of a complicated explaination, but I hope it makes sense.

The only way I could get around the way the preview page is created is by making the preview using some other method.

ie: Actually SAVE the contents of the editor, and then call that page in the browser window as the "preview".  That would work, but then the problem is that you'd have to configure your system to always have a "writable" file somewhere hanging around, just for this purpose.  That's not so bad, but it would create a configuration problem since many people don't want to do this kind of thing (have a writable file with no other purpose), and it would add an extra step to the installation tasks, etc...  (Not to mention what would happen if multiple people tried saving at the same time.. arg.)

I've been recently thinking about completely changing how the preview system works, because of another problem someone else is having due to the "close this window" button being injected at the top of the page...  but still not sure what is the best way to resolve this particular problem.

Report to moderator   Logged
Jenkinhill

Posts: 420



[-] Re: Preview Hyperlinks after editing a page
« Reply #4 on: May 02, 2006, 11:18:18 AM »

Henri, as I understand it,  DreamWeaver creates a temporary file for viewing an edited page in a browser. This is saved under a temporary & unique name to the same directory as the original of the page being previewed, and deleted either when another preview is requested, or when the program is closed. Could that sort of process be used? It would also solve the problem with the current preview setup and IE7, where there is a linking error with css and images.
Report to moderator   Logged

Kelvyn
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Re: Preview Hyperlinks after editing a page
« Reply #5 on: May 09, 2006, 11:18:34 AM »

The only problem with this is that there might not be a temp location to save the file to.

When you run PHP on your server, it usually runs as the "nobody" user, which is a special "user" for the operating system that has zero privileges.

(that's why you have to make the files you want to edit "writable".. so that snippetmaster can "write" to the file, since otherwise it doesn't have permissions.)

Now, the problem is that we don't have any place on the web server to write a temp preview file that would also be accessible from the browser.  (Remember that not everyone uses the default location of the snippet-db folder, and lots of people "locate" the db folder in a place that isn't accessible from the web.)

So unless we can ALWAYS have a temp location that is 100% writable, then it won't work.  And in order to make that happen, I would need to add some very complicated installation instructions for installing the application, etc... and to be honest, I'm not sure the increase in complexity to install the program would be worth the benefit.

Thoughts?

Report to moderator   Logged
Jenkinhill

Posts: 420



[-] Re: Preview Hyperlinks after editing a page
« Reply #6 on: May 09, 2006, 02:11:49 PM »

I have not tested links on preview pages yet, but the ie7 issue with images is solved. CSS is still not being linked to the preview page, though. Css on preview does work  if I use a full url (http://domain.etc/file.css) rather than a relative url for the page. I noticed that the baseref tag locates after the css link in the page head code. Is there someway to move the basref tag to a position immediately below the <head> rather than just above the <head> tag? Or could there be other issues then, such as JavaScript files?

I see the issue with temp files.
Report to moderator   Logged

Kelvyn
Jenkinhill

Posts: 420



[-] Re: Preview Hyperlinks after editing a page
« Reply #7 on: May 10, 2006, 02:16:01 AM »

Links from a preview page bring up the target page OK and still give the postdata/resend error message. But that is liveable with. Just a case of educating the user to click OK!
Report to moderator   Logged

Kelvyn
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Re: Preview Hyperlinks after editing a page
« Reply #8 on: May 11, 2006, 03:53:38 PM »


 Is there someway to move the basref tag to a position immediately below the <head> rather than just above the <head> tag?


This has been fixed in a release I just did now.  Version 2.2.1.  I didn't make an announcement to the list, since it's a minor update.

But it fixes this problem.  Now, the base href tag is included immediately after the opening HEAD and also immediately before the closing HEAD.

Smile

Let me know how it works for you...

http://www.snippetmaster.com/download/

Report to moderator   Logged
Jenkinhill

Posts: 420



[-] Re: Preview Hyperlinks after editing a page
« Reply #9 on: May 12, 2006, 12:57:37 AM »

That has fixed the preview, with styles showing perfectly. Excellent job, Henri.
Report to moderator   Logged

Kelvyn
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  Suggestions & Feature Requests  |  Topic: Preview Hyperlinks after editing a page « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!