{"_id":"5635b294d209b50d0031dfeb","project":"550a7754635c660d0052808e","__v":0,"version":{"_id":"5635b290d209b50d0031dfc4","__v":1,"project":"550a7754635c660d0052808e","createdAt":"2015-11-01T06:34:56.868Z","releaseDate":"2015-11-01T06:34:56.868Z","categories":["5635b291d209b50d0031dfc5","5635b291d209b50d0031dfc6","5635b291d209b50d0031dfc7","5635b291d209b50d0031dfc8","5635b291d209b50d0031dfc9","5635b291d209b50d0031dfca"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.25.0","version":"0.25"},"category":{"_id":"5635b291d209b50d0031dfc7","pages":["5635b294d209b50d0031dfdf","5635b294d209b50d0031dfe0","5635b294d209b50d0031dfe1","5635b294d209b50d0031dfe2","5635b294d209b50d0031dfe3","5635b294d209b50d0031dfe4","5635b294d209b50d0031dfe5","5635b294d209b50d0031dfe6","5635b294d209b50d0031dfe7","5635b294d209b50d0031dfe8","5635b294d209b50d0031dfe9","5635b294d209b50d0031dfea","5635b294d209b50d0031dfeb","5635b294d209b50d0031dfec"],"project":"550a7754635c660d0052808e","__v":1,"version":"5635b290d209b50d0031dfc4","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-09T03:24:43.474Z","from_sync":false,"order":2,"slug":"customizing-telescope","title":"Customizing Telescope"},"user":"5469e5dfa3b67a0e00559b06","githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-19T00:59:04.861Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":27,"body":"Something not working? You've come to the right place. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Checklist\"\n}\n[/block]\nHere's a checklist of things to work through when modifying Telescope and creating your own custom packages.\n\n#### Are there any errors?\n\nWhen encountering a problem, make sure you check both the **browser console** and the **server-side logs** for errors. See [accessing logs](http://docs.telescopeapp.org/docs/troubleshooting-1).\n\n#### Have you added your package? \n\nHave you added your custom theme package with `meteor add`? Make sure that your package is listed in `.meteor/packages`. You can also check the contents of the `Package` object in your browser console. \n\n#### Are you specifying the proper dependencies?\n\nAll packages should specify a dependency on `telescope:core` using `api.use`. And depending on the package's functionality, you might want to depend on core packages (like `http` for making HTTP calls) or third-party packages, if they're not already used by Telescope.\n\n#### Is your package loading in the right order?\n\nSpecifying a dependency ensures that your package loads *after* the package it depends on. You can use this to control the load order of your packages.\n\n#### Are you including your files?\n\nMake sure you're including all your package's files with `api.addFiles` in the package manifest.\n\nYou can verify that a template is being properly loaded by opening up your console and typing `Template.yourTemplateName`. \n\n#### Are you including your files in the right environment?\n\nIt's important to add files to the proper environment. For example, regular templates should only be included on the client, while *email* templates should be included in the *server*. \n\nOn the other hand, JavaScript code can be included on the server, client, or both, depending on the situation. \n\n#### Are you replacing templates?\n\nOnce your custom template is being properly loaded, don't forget that you still need to override the original template with `Template.foo.replaces(\"bar\")`.\n\n#### Are you inserting modules?\n\nIf you're trying to insert a template into a template module zone, you can make sure the insertion is working by typing out `Telescope.modules.nameOfZone` in your browser console and verifying that your template appears in the list. \n\n#### Are you including your files in the right order?\n\nIf you're replacing templates, you'll want to make sure that the replacement code is loaded *after* the template it's replacing. You can change the order of the files in `api.addFiles` to control this.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Common Issues\"\n}\n[/block]\n#### Works Locally, But Not In Production\n\nIs your app working fine locally, but not at all once you deploy? If so, you probably have an error somewhere in your client-side code. Check your browser console for any errors. \n\n#### Missing Template\n\n`Uncaught TypeError: Cannot read property 'helpers' of undefined`\n\nThis usually means that you're declaring a helper on a template that doesn't exist. Make sure that you've correctly added the template using `api.addFiles`. \n\n#### Template Not Defined\n\n`Can't replace template xyz because it hasn't been defined yet.`\n\nThis means that at the point in your code where you're trying to replace a template, it hasn't been define yet. Make sure you're replacing templates *after* they are loaded by your package. \n\n#### Server Error\n\n`Uncaught SyntaxError: Unexpected token Y`\n\nThis means something is wrong on the server, usually because of a syntax error. Reload the page or check the server logs to see the server output.\n\n#### Not Defined\n\n`X is not defined`\n\nThis often means you haven't specified the proper dependencies. Make sure your package depends on `telescope:core`.","excerpt":"","slug":"troubleshooting","type":"basic","title":"Troubleshooting"}
Something not working? You've come to the right place. [block:api-header] { "type": "basic", "title": "Checklist" } [/block] Here's a checklist of things to work through when modifying Telescope and creating your own custom packages. #### Are there any errors? When encountering a problem, make sure you check both the **browser console** and the **server-side logs** for errors. See [accessing logs](http://docs.telescopeapp.org/docs/troubleshooting-1). #### Have you added your package? Have you added your custom theme package with `meteor add`? Make sure that your package is listed in `.meteor/packages`. You can also check the contents of the `Package` object in your browser console. #### Are you specifying the proper dependencies? All packages should specify a dependency on `telescope:core` using `api.use`. And depending on the package's functionality, you might want to depend on core packages (like `http` for making HTTP calls) or third-party packages, if they're not already used by Telescope. #### Is your package loading in the right order? Specifying a dependency ensures that your package loads *after* the package it depends on. You can use this to control the load order of your packages. #### Are you including your files? Make sure you're including all your package's files with `api.addFiles` in the package manifest. You can verify that a template is being properly loaded by opening up your console and typing `Template.yourTemplateName`. #### Are you including your files in the right environment? It's important to add files to the proper environment. For example, regular templates should only be included on the client, while *email* templates should be included in the *server*. On the other hand, JavaScript code can be included on the server, client, or both, depending on the situation. #### Are you replacing templates? Once your custom template is being properly loaded, don't forget that you still need to override the original template with `Template.foo.replaces("bar")`. #### Are you inserting modules? If you're trying to insert a template into a template module zone, you can make sure the insertion is working by typing out `Telescope.modules.nameOfZone` in your browser console and verifying that your template appears in the list. #### Are you including your files in the right order? If you're replacing templates, you'll want to make sure that the replacement code is loaded *after* the template it's replacing. You can change the order of the files in `api.addFiles` to control this. [block:api-header] { "type": "basic", "title": "Common Issues" } [/block] #### Works Locally, But Not In Production Is your app working fine locally, but not at all once you deploy? If so, you probably have an error somewhere in your client-side code. Check your browser console for any errors. #### Missing Template `Uncaught TypeError: Cannot read property 'helpers' of undefined` This usually means that you're declaring a helper on a template that doesn't exist. Make sure that you've correctly added the template using `api.addFiles`. #### Template Not Defined `Can't replace template xyz because it hasn't been defined yet.` This means that at the point in your code where you're trying to replace a template, it hasn't been define yet. Make sure you're replacing templates *after* they are loaded by your package. #### Server Error `Uncaught SyntaxError: Unexpected token Y` This means something is wrong on the server, usually because of a syntax error. Reload the page or check the server logs to see the server output. #### Not Defined `X is not defined` This often means you haven't specified the proper dependencies. Make sure your package depends on `telescope:core`.