Oturum açın

Testing and Troubleshooting

The previous pages discussed various ways to create and customize your subscribed link. This page provides tips for testing and troubleshooting them. If you used a lot of regular expressions in your XML file, you should perform more rigorous testing, because the custom results might not work as you expected. If you don't find your issues being addressed here, post your question on the Subscribed Links Discussion Group.

Contents

This page includes the following sections:

Testing Your Subscribed Link

After you have created your subscribed link, test them out to see if they are working as expected. If you have created a basic subscribed link, you can start testing your queries in the Google search page. If you have created a dynamic subscribed link, you need to submit your TSV file, augmented web feed, or XML file in the Developer Console. The page includes a list of subscribed link files that you have created and their statuses. If you just submitted your subscribed link file, wait for the page to indicate that it is ready.

If the Developer Console does not display an error message, you can start testing your queries on the Google search page. If you don't see the results you expect, use our interactive debugging tool to investigate further. You can access this tool from the Test and troubleshoot tab of the Developer Console.

If you haven't published your subscribed link yet, no one but you can see your custom results. You can see the results because you are automatically subscribed to your own subscribed link. But once you publish the subscribed link and you have web users who opted to add them to their Google search page, they will be able to see your custom results, including the ones you are still testing. For more information about publication, see the Publishing Your Subscribed Link page.

Testing Your XML File

If you created your subscribed link using XML, you can hide certain results from your users while you are still testing them. All you have to do is add the attribute and value test="true" to the ResultSpec tag, as shown in this example:

<Results>
<ResultSpec id="HighwayMatch1" test="true">
  <Query>speed limit on [Highway]</Query>
  <Response>
    <Output name="title">Speed limit info for [0.fullname]</Output>

    <Output name="more_url">www.myspeedlimitssite.com/describe?hwy=[0.abbrev]</Output>
    <Output name="text1">The maximum speed limit on [0.fullname]</Output>
    <Output name="text2">is [0.max_speed_limit].</Output>
  </Response>

</ResultSpec>
</Results>    

Your users will still be able to access all the custom results in your subscribed link except for the ones that have been tagged with the test attribute. You, on the other hand, will still be able to trigger the custom results, including the hidden ones. You can freely modify your test queries and results and not worry about having your experiments affect your users' search experience.

Troubleshooting Subscribed Link

If you don't see the results you expect, use our interactive debugging tool to investigate further. You can access this tool from the Test and troubleshoot tab of the Developer Console. After you fix the issues, upload the file or submit the URL of the file again, even though you have not changed the file name.

XML Errors

If you submit an XML file that is not valid or well-formed, the debugging tool will display a message. The following table describes common causes of XML errors.

Troubleshooting XML Errors
Cause Description and Solution
Duplication of IDs DataObject and ResultSpec tags must have unique element IDs. A DataObject element and a ResultSpec element can share the same ID, but a DataObject cannot share the same ID with another DataObject, and a ResultSpec cannot share the same ID with another ResultSpec. If you have multiple XML files, the IDs must be unique across all the files.

Duplicate IDs might prevent your custom result from appearing.
DataObject has empty Query Your DataObject element must have a Query child element that is not empty.
Invalid name for object type You cannot create object types with the same name as a special object type. Special object types include [Country], [City], and [date]. Also, you cannot include periods (.) or brackets ([ ]) in the name of an object type.
Invalid attribute values Verify that the values of your attributes are correct, spelled properly, and do not contain periods or brackets.
Mismatched attribute names The attribute names used in your Response section should match those in the DataObject.
Mismatched brackets Verify that all your brackets have opening ([) and closing brackets (]) and are placed in the correct position.
Misplaced RE: tags Object types cannot begin with a regular expression and be prefixed with [RE:].
Missing quotation marks Make sure that your attribute values have opening and closing quotation marks (" ").
Misspellings of element, attribute names, or attribute values Verify that you have spelled the XML tags correctly. They are case sensitive, so you should follow the capitalization in the developer's guide. Note that the DataObject, QueryName and ResultSpec tags are concatenated capitalized words.

Object types, which are query variables, are also case-sensitive. For more information about object types and queries, see the Expanding Your Queries page.
Invalid UTF-8 characters The XML parser does not recognize special UTF-8 characters. You have to remove them until your subscribed link file contain only valid ASCII or UTF-8 characters
Reserved characters The Subscribed Links API has special characters that are reserved. So if you want to use them, you need to use the escape characters.

Results That Do Not Appear

The following table describes common causes of results that do not show up as expected:

Troubleshooting Results That Do Not Appear
Cause Description and Solution
The typed query does not match the specified queries The triggers are precise, so you must type the search queries with the exact words in the exact combination and in the exact order that you specified in the subscribed link file. You might be forgetting to include a preposition or have added an additional word. For example, if your specified query is "Palace Museum in Beijing" and you typed "Palace Museum Beijing" (without the preposition) in the search box, nothing is displayed. One way to minimize this problem is using regular expressions, which is described in Creating Patterns of Queries.
You have QueryName elements, ResultSpec id, or DataObject id that are not unique Go to the Manage your subscribed link tab in http://www.google.com/coop/manage/subscribedlinks/ and verify that your XML files do not have a duplicate ID error. If they do, go through the files and look for repeated ID values. Make sure each one is unique.
Your subscribed link file is not accessible If you are hosting your subscribed link file from a website and submitted the URL to Google, type the URL in a web browser and see if you can access the file. If you cannot, you might want to change the permissions of your file or verify that you have specified the correct URL. The URL or file might have a typographical error or be located in a different directory.
The query takes too much time to evaluate If the query takes too much time to evaluate, the matching process times out. Make sure that the regular expressions in your query patterns are efficient.
The ResultSpec element has the test attribute The test attribute hides the results from your users. Remove the attribute and its value from each ResultSpec that you want to publish. So if your code looks like this: <ResultSpec id="UniqueID" test="true">, remove the test="true" portion.

Unexpected Results

The following table describes common causes of results that are different from what you expected:

Troubleshooting Unexpected Results
Cause Description and Solution
Mismatched DataObject and QueryName elements Make sure that the types of DataObject and the values of the QueryName elements for those objects match.
Regular expressions Verify that you are using Perl-compatible regular expressions (PCRE), and then review the regular expression.

Taking the Next Step

You got your subscribed link working, so it's time to publish your subscribed link and show off your work to the rest of the world.

 

< Back to Designing the Look and Feel | Forward to Publishing Your Subscribed Link >