Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

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