views:

133

answers:

1

I am closely following the tutorial here as I attempt to create a Firefox extension. I have the following tree for my extension:

backtosearch
  +-chrome
    +-content
      backtosearch.xul
  +-chrome.manifest
  +-install.rdf

I have created a testing profile for FF called "Extension Testing" and have added a file to the profile extensions folder "[email protected]" containing absolute path to the extension folder. I have reloaded the browser chrome using the extension development extension and restarted the browser - but I see no new button.

I have simplified the tutorial (as I only require one button), and my .xul contains only that. My chrome.manifest file contains:

content backtosearch chrome/content/
overlay chrome://browser/content/browser.xul chrome://backtosearch/content/backtosearch.xul

The extension is not showing under view -> toolbars or tools -> addons

Thanks for any help

install.rdf

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#"&gt;

    <Description about="urn:mozilla:install-manifest">

        <!-- Required Items -->
        <em:id>[email protected]</em:id>
        <em:name>Back To Search</em:name>
        <em:version>1.0</em:version>

        <em:targetApplication>
            <Description>
                <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
                <em:minVersion>1.5</em:minVersion>
                <em:maxVersion>3.5.*</em:maxVersion>
            </Description>
        </em:targetApplication>

        <!-- Optional Items -->
        <em:creator>Dylan Lloyd</em:creator>
        <em:description>Adds options to return to your last search immediately.</em:description>
        <em:homepageURL>http://www.getyourkeywords.com/&lt;/em:homepageURL&gt;

    </Description>
</RDF>

[email protected]

C:\Users\Dylan\Desktop\backtosearch\
A: 

From your description it's not clear what the problem is. The most likely cause, as sdwilsh noted is that the Extension didn't get registered. If this is the case, the extension will not appear in Tools -> Addons.

You can try to set extensions.logging.enable pref to true to help debugging. Maybe try installing a helloworld extension first?

Possible causes:

  • You didn't use the correct name for the "link" file (must match the extension ID).
  • The "link" file contents is invalid (the path format is OS-native). In your case the path should end with "backtosearch"
  • Incorrect install.rdf. You can check it at least to be valid XML by opening it in Firefox (possibly renaming to .xml first) -- if the yellow screen opens, its invalid.
  • Installed in the wrong profile or didn't really restart Firefox.

If the extension is registered, try opening chrome://backtosearch/content/backtosearch.xul in Firefox (by copying that to the Location bar) -- if any errors appear, you should fix them. If the file loads successfully (may be empty), there's a problem with your overlay's contents, which is hard to debug without seeing it. Perhaps start with an overlay that's known to work?

Nickolay
thank you for your response, it's greatly appreciated. I am sure of the link, path, and path format. I will enable the logging and check the xml validity. I have reloaded the chrome, closed and restarted firefox, and restarted the computer, and triple checked that I placed the link file in the correct directory. (one scare that crossed my mind, originally the alt profile was called "ExtensionTesting", and was later modified to "Extension Testing", while its profile directory name did not change. could that mean anything? but other extensions i installed into the profile showed up there)
Nona Urbiz
after checking: install.rdf is valid xml.
Nona Urbiz
attempting to open the path gave me a blank page, and wouldnt really "register" my [enter] presses or "go" clicks. what could this mean? Also, I'm a bit confused about the "registering process", can you explain that a bit more? thaanks again so much.
Nona Urbiz
So you didn't say if the extension was showing up in Tools -> Addons. If it's not, you have a problem in the "link" file or the extension's install.rdf. First try installing in a different profile and if it fails, post the exact paths to+contents of the link file and install.rdf // Re #3: empty page with no errors is OK as long as its title is the chrome:// URL, not "(Untitled)". "view source" on it should show your overlay's contents.
Nickolay
actually, it just refuses to go there. it was a blank tab because i opened a new tab. i posted the files you mentioned. thanks so much for the help.
Nona Urbiz
Is it true that the extension does not appear in Tools -> Addons? If so, you messed up its registration. I successfully got it to appear in Tools -> Addons by using your install.rdf and your link file. So as I said before, try installing to a different profile, then post the exact **paths to** the link file (in the new profile) and install.rdf. Also did you try to enable logging?
Nickolay
Nona Urbiz
I'm sorry it's so frustrating for you, but it's definitely not common to have problems with this. My best guess right now is that your editor inserts the Unicode byte order mark into the beginning of the link file. It would appear as three junk bytes when you look at it in binary. You can send the link file to me: [email protected]. I would prefer to continue over e-mail anyways, since the comments system here is ridiculous.
Nickolay
re logging - I just updated the developer.mozilla.org page to answer your question.
Nickolay