Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

mozilla.cfg file to lock preferences.

  • 2 отговора
  • 7 имат този проблем
  • 1 изглед
  • Последен отговор от pfostentreffer

more options

Hi there!

I recently created a mozilla.cfg file to lock the firefox preferences related to changing the homepage:

The contents of mozilla.cfg is as follows:

//

lockPref("browser.startup.page", 1);

lockPref("browser.startup.homepage", "http://www.google.com.au/firefox"); lockPref("pref.browser.homepage.disable_button.current_page", true); lockPref("pref.browser.homepage.disable_button.restore_default", true); lockPref("pref.browser.homepage.disable_button.bookmark_page", true);

This works great! My homepage is locked, as is the buttons to change the homepage via bookmarks etc.

However whenever I start firefox I get this message:


Netscape.cfg/AutoConfig failed. Please contact your system administrator.

Error: defaultPref failed: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setBoolPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: prefcalls.js :: defaultPref :: line 91"  data: no]

But my preferences are locked and firefox works fine otherwise.

Before when I just locked the homepage itself (so you can't type out a new one, but you could use the buttons such as "use current page" to change the homepage) it worked without any error message. Now that I have added those last 3 lines into mozilla.cfg I get that error message on startup. But everything works exactly as I wanted.

What is the error message about, how do I fix it or how do I supress the message so it doesn't appear whever I start up.

Thanks for your time!

Hi there! I recently created a mozilla.cfg file to lock the firefox preferences related to changing the homepage: The contents of mozilla.cfg is as follows: // lockPref("browser.startup.page", 1); lockPref("browser.startup.homepage", "http://www.google.com.au/firefox"); lockPref("pref.browser.homepage.disable_button.current_page", true); lockPref("pref.browser.homepage.disable_button.restore_default", true); lockPref("pref.browser.homepage.disable_button.bookmark_page", true); This works great! My homepage is locked, as is the buttons to change the homepage via bookmarks etc. However whenever I start firefox I get this message: Netscape.cfg/AutoConfig failed. Please contact your system administrator. Error: defaultPref failed: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setBoolPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: prefcalls.js :: defaultPref :: line 91" data: no] But my preferences are locked and firefox works fine otherwise. Before when I just locked the homepage itself (so you can't type out a new one, but you could use the buttons such as "use current page" to change the homepage) it worked without any error message. Now that I have added those last 3 lines into mozilla.cfg I get that error message on startup. But everything works exactly as I wanted. What is the error message about, how do I fix it or how do I supress the message so it doesn't appear whever I start up. Thanks for your time!

Променено на от Anionz

Избрано решение

I have determined that it is due to the line:

lockPref("pref.browser.homepage.disable_button.bookmark_page", true);

In my about:config this is listed as a string whereas the other two are listed as boolean?

Solved! I reset this entry in about:config, on restarting Firefox it was deleted and I could add it in again as a boolean entry. Now it all workes great!

Прочетете този отговор в контекста 👍 0

Всички отговори (2)

more options

Избрано решение

I have determined that it is due to the line:

lockPref("pref.browser.homepage.disable_button.bookmark_page", true);

In my about:config this is listed as a string whereas the other two are listed as boolean?

Solved! I reset this entry in about:config, on restarting Firefox it was deleted and I could add it in again as a boolean entry. Now it all workes great!

Променено на от Anionz

more options

lockPref("toolkit.telemetry.prompted", true) is a possible source of this error, too. Tested with FF 9.0.1, the parameter seems to be no more boolean, but integer.

Променено на от pfostentreffer