Closed Bug 110902 Opened 23 years ago Closed 23 years ago

defaultPref not setting startup.homepage preference

Categories

(Core :: Preferences: Backend, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 109932

People

(Reporter: rvelasco, Assigned: bnesse)

Details

Attachments

(1 file)

116 bytes, application/octet-stream
Details
Using the preference in a hashed CFG.... defaultPref("browser.startup.homepage", "http://www.yahoo.com"); ...does not allow browser to startup with with specified homepage. Blank page appears. Only a lockPref will allow the startup.homepage to appear. i.e. lockPref("browser.startup.homepage", "http://www.yahoo.com");
Attached file Hashed CFG
download attachment as netscape.cfg and activate CFG via all.js (mozilla) or all-ns.js (netscape 6.2) with the lines... pref("general.config.filename", "netscape.cfg); pref("general.config.vendor", "netscape);
QA Contact: sairuh → rvelasco
This is because you can't set a default preference on a LocalizedUnicharPref. Its default value comes from a properties file. Please see bug 109902 and bug 109932 for additional info.
What syntax can we use to set this preference if an IT administrator wants to customize this field, but not have it locked? pref("browser.startup.homepage", "http://www.yahoo.com"); /* Doesn't work */ user_pref("browser.startup.homepage", "http://www.yahoo.com"); /* doesn't work and also incorrect since user_pref syntax is only defined in the prefs.js */ So is the lockPref function the only way to customize this field? Historical aside: in the 4.x days defaultPref("browser.startup.homepage", "blah"); was the correct way to set this field without having it locked...but I guess we are living in new times now.
*** This bug has been marked as a duplicate of 109932 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
pref("browser.startup.homepage", "http://www.yahoo.com"); should work, it might have failed if the preference was set to the locked state.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: