Ticket #99 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Patch: Linker needs to give feedback on failure

Reported by: riftdesign Owned by: gogo
Priority: high Milestone:
Component: Plugin_Linker Version:
Severity: major Keywords:
Cc: Niko <ns@…>

Description

In the case that scan.php returns malformed data, Linker does nothing to respond. When the "Insert Web Link" icon is clicked, nothing happens nor is there a javascript error thrown. It would be beneficial to the developer to know what happened. It would be helpful for the user to know that something isn't working correctly.

Change History

Changed 7 years ago by Niko <ns@…>

  • owner changed from gogo to Niko <ns@vivid-planet.com>

godd idea, i will implement this next week...

Changed 7 years ago by Niko <ns@…>

  • owner changed from Niko <ns@vivid-planet.com> to anonymous
  • status changed from new to assigned

Changed 7 years ago by Niko <ns@…>

  • owner changed from anonymous to Niko <ns@vivid-planet.com>
  • status changed from assigned to new

Changed 7 years ago by Niko <ns@…>

  • owner changed from Niko <ns@vivid-planet.com> to gogo
  • summary changed from Linker needs to give feedback on failure to Patch: Linker needs to give feedback on failure

Patch (#67 is allready applied)

Index: linker.js
===================================================================
--- linker.js   (Revision 54)
+++ linker.js   (Arbeitskopie)
@@ -315,7 +315,14 @@
     {
         //get files from backend
         HTMLArea._getback(linker.lConfig.backend,
-                          function(txt) { lDialog.files = eval(txt); lDialog._prepareDialog(); });
+                          function(txt) {
+                            try {
+                                lDialog.files = eval(txt);
+                            } catch(Error) {
+                                alert('Error loading '+linker.lConfig.backend+':\n'+Error.toString());
+                                lDialog.files = [ {url:'',title:Error.toString()} ];
+                            }
+                            lDialog._prepareDialog(); });
     }
     else if(linker.lConfig.files != null)
     {

...don't know whats best here, either we use the alert, or we just display the error-message in the tree (one line should be removed)

Changed 7 years ago by anonymous

  • cc Niko <ns@…> added

Changed 7 years ago by niko

  • status changed from new to closed
  • resolution set to fixed

commited this patch as changeset:57, additional info about syntax in wiki:Linker

Note: See TracTickets for help on using tickets.