* Improve Website Plugin

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
jeemo
Famous
Posts: 129
Joined: 04 Jun 2004 07:52
Family Historian: V5
Location: Central Coast, NSW, Australia
Contact:

Improve Website Plugin

Post by jeemo » 18 Feb 2013 20:43

Just downloaded and tried this plugin. When running the Hyperlink/Text tab an error message as shown below appeared.

...torianPluginsImprove Website or CD DVD HTML.fh_lua:3085: stack overflow
stack traceback:
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3085: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3103: in function 'strHyper'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3226: in function 'IntImproveHTML'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3865: in function
     (tail call): ?
     [C]: in function 'MainLoop'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3980: in function 'GUI_MainDialogue'
     ...torianPluginsImprove Website or CD DVD HTML.fh_lua:3998: in main chunk

After closing the error window, the frozen window was still in view. Clicking the 'Stop Converting URL' button didn't work.  It was at 33% and 3sec. Using the Wondows X Stop button closed it.  This left the Main Window present but nothing worked on it. Again using the Wondows X Stop button closed it.

Repeated attempts produced identical results.

ID:6766
John
Central Coast, NSW, Australia
Website : http://freepages.genealogy.rootsweb.anc ... name1.html

User avatar
tatewise
Megastar
Posts: 27080
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Improve Website Plugin

Post by tatewise » 18 Feb 2013 22:42

Sorry about that John.

I have spotted the problem and fixed the code.

Version 2.1 should be available from the Plugin Store tomorrow.

It is caused by some text field containing one of the following, other than in a genuine hyperlink URL:://
mailto:
www.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jeemo
Famous
Posts: 129
Joined: 04 Jun 2004 07:52
Family Historian: V5
Location: Central Coast, NSW, Australia
Contact:

Improve Website Plugin

Post by jeemo » 20 Feb 2013 20:13

Thanks Mike, now working OK although the new pages don't validate as '_blank' is not valid XHTML code.  That's difficult to fix without using JavaScript
John
Central Coast, NSW, Australia
Website : http://freepages.genealogy.rootsweb.anc ... name1.html

User avatar
tatewise
Megastar
Posts: 27080
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Improve Website Plugin

Post by tatewise » 20 Feb 2013 20:52

I am aware of the problem John, but it is not _blank that is invalid but the target= attribute.
That is why the Help & Advice says:
'The alternative is to open In new Tab or Window although this is officially deprecated on the Internet.'
The implication is you are free to use it on CD/DVD.

As you suggest, one workaround is for the Plugin to substitute
target='_blank'
with JavaScript such as
onclick='window.open(this.href,'_blank');return false;'
but if the user has JavScript disabled that won't work.

Another workaround I've seen suggested is to alter the !DOCTYPE from XHTML 1.0 Strict to XHTML 1.0 Transitional.

Have you any other proposals?

It seems to work in all browsers anyway, so pragmatically what is the problem?

If you really MUST have XHTML 1.0 Strict then don't use the target='_blank' option.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jeemo
Famous
Posts: 129
Joined: 04 Jun 2004 07:52
Family Historian: V5
Location: Central Coast, NSW, Australia
Contact:

Improve Website Plugin

Post by jeemo » 21 Feb 2013 20:44

Sorry Mike.  I quoted the value not the attribute.

I was just pointing this out but it's not a big deal.  All browsers (maybe even all versions) recognise target as an attribute, so the pages will render properly and go to a new tab.
As you suggest, one workaround is for the Plugin to substitute
target='_blank'
with JavaScript such as
onclick='window.open(this.href,'_blank');return false;'
but if the user has JavScript disabled that won't work.
On all my Historian pages I use the 'noscript' tag to generate a warning to catch a browser where JavaScript has been turned off.


An interesting aside - I just found here on FHUG, if I insert the word noscript in the normal tag brackets , the spelling changes to noscrypt e.g.
John
Central Coast, NSW, Australia
Website : http://freepages.genealogy.rootsweb.anc ... name1.html

Post Reply