[ERROR] nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

[ERROR] nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"

Postby baby1902 » Thu Mar 03, 2011 2:38 pm

Hi all,
I just have fresh install phpBB 3.0.8 and phpBB SEO v0.6.6, but get this error
Code: Select all
uncaught exception: [Exception... "Illegal value" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://localhost/styles/prosilver/template/forum_fn.js :: phpbb_seo_href :: line 81" data: no]

I find the problem come from
Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
function jumpto() {
   var page = prompt(jump_page, on_page);

   if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
      var seo_page = (page - 1) * per_page;
      var anchor = '';
      var anchor_parts = base_url.split('#');
      if ( anchor_parts[1] ) {
         base_url = anchor_parts[0];
         anchor = '#' + anchor_parts[1];
      }
      if ( base_url.indexOf('?') >= 0 ) {
         document.location.href = base_url.replace(/&/g, '&') + '&start=' + seo_page + anchor;
      } else if ( seo_page > 0 ) {
         var seo_type1 = base_url.match(/\.[a-z0-9]+$/i);
         if (seo_type1 !== null) {
            document.location.href = base_url.replace(/\.[a-z0-9]+$/i, '') + seo_delim_start + seo_page + seo_type1 + anchor;
         }
         var seo_type2 = base_url.match(/\/$/);
         if (seo_type2 !== null) {
            document.location.href = base_url + seo_static_pagination + seo_page + seo_ext_pagination + anchor;
         }
      } else {
         document.location.href = base_url + anchor;
      }
   }
}
// Open external links in new window in a XHTML 1.x compliant way.
/**
*  phpbb_seo_href()
*  Fixes href="#something" links with virtual directories
*  Optionally open external or marked with a css class links in a new window
*  in a XHTML 1.x compliant way.
*/
function phpbb_seo_href() {
   var current_domain = document.domain.toLowerCase();
   if (!current_domain || !document.getElementsByTagName) return;
   if (seo_external_sub && current_domain.indexOf('.') >= 0) {
      current_domain = current_domain.replace(new RegExp(/^[a-z0-9_-]+\.([a-z0-9_-]+\.([a-z]{2,6}|[a-z]{2,3}\.[a-z]{2,3}))$/i), '$1');
   }
   if (seo_ext_classes) {
      var extclass = new RegExp("(^|\s)(" + seo_ext_classes + ")(\s|$)");
   }
   if (seo_hashfix) {
      var basehref = document.getElementsByTagName('base')[0];
      if (basehref) {
         basehref = basehref.href;
         var hashtest = new RegExp("^(" + basehref + "|)#[a-z0-9_-]+$");
         var current_href = document.location.href.replace(/#[a-z0-9_-]+$/i, "");
      } else {
         seo_hashfix = false;
      }
   }
   var hrefels = document.getElementsByTagName("a");
   var hrefelslen = hrefels.length;
   for (var i = 0; i < hrefelslen; i++) {
      var el = hrefels[i];
      var hrefinner = el.innerHTML.toLowerCase();
      if (el.onclick || (el.href == '') || (el.href.indexOf('javascript') >=0 ) || (el.href.indexOf('mailto') >=0 ) || (hrefinner.indexOf('<a') >= 0) ) {
         continue;
      }
      if (seo_hashfix && el.hash && hashtest.test(el.href)) {
         el.href = current_href + el.hash;
      }
      if (seo_external) {
         if ((el.href.indexOf(current_domain) >= 0) && !(seo_ext_classes && extclass.test(el.className))) {
            continue;
         }
         el.onclick = function () { window.open(this.href); return false; };
      }
   }
}
if (seo_external || seo_hashfix) {
   onload_functions.push('phpbb_seo_href()');
}
// www.phpBB-SEO.com SEO TOOLKIT END

This error causes wysiwyg for quick reply cannot load in viewtopic. Thanks for your help.
baby1902
 
Posts: 2
Joined: Tue Mar 01, 2011 9:27 am

Advertisement

Re: [ERROR] nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"

Postby SeO » Fri Mar 04, 2011 8:02 am

baby1902 wrote:I just have fresh install phpBB 3.0.8 and phpBB SEO v0.6.6, but get this error


I would not call it a fresh install if you actually have other mods (like wysiwyg).

Since the fresh code does not cause this, I need more input to eventually be helpful :
where is line 80 exactly in the code you quoted ?
where di you get the wysiwyg from ?
does it work without it ?
can we see this issue live somewhere ?
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Re: [ERROR] nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"

Postby baby1902 » Fri Mar 04, 2011 1:54 pm

Here is the line 81 where the browser say error
Code: Select all
      if (el.onclick || (el.href == '') || (el.href.indexOf('javascript') >=0 ) || (el.href.indexOf('mailto') >=0 ) || (hrefinner.indexOf('<a') >= 0) )

This mod was used [Release] Quick reply plugin for Almsamim WYSIWYG 0.0.9 RC3
Link download: http://www.phpbb.com/community/viewtopi ... &t=2101013
Before I install phpBB Seo, quick reply button is shown normal. After insalling, it can not load.
This error occur on firefox 3.6.14, IE 8, Chrome. Without error on opera 10.
Thank you very much.
baby1902
 
Posts: 2
Joined: Tue Mar 01, 2011 9:27 am


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Bing [Bot] and 41 guests