Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting a couple errors #19

Open
isAlmogK opened this issue Oct 12, 2014 · 5 comments
Open

Getting a couple errors #19

isAlmogK opened this issue Oct 12, 2014 · 5 comments

Comments

@isAlmogK
Copy link

If I'm using your blog package and use the shareit outside the blog I'm getting the following errors

Exception from Tracker afterFlush function: string is not a function
TypeError: string is not a function
at Template.shareit.rendered (http://localhost:3000/packages/joshowens_shareit.js?e9d2ef9de98d0405521de354bb5338fe6ae6cfbb:159:24)

But if I add the shareit package (meteor add fantasyhub:shareit) I then get the following errors
Uncaught Error: There are multiple templates named 'shareit'. Each template needs a unique name.

@queso
Copy link
Member

queso commented Oct 12, 2014

Try again, I added shareit back to atmosphere, I have no idea why it disappeared off atmosphere?

@isAlmogK
Copy link
Author

Ok it works not thanks for the quick support

@isAlmogK
Copy link
Author

I'm still getting the following error

Exception from Tracker afterFlush function: string is not a function
TypeError: string is not a function
at Template.shareit.rendered (http://localhost:3000/packages/joshowens_shareit.js?e9d2ef9de98d0405521de354bb5338fe6ae6cfbb:159:24)

This is how I'm adding the share buttons
{{> shareit}}

@isAlmogK isAlmogK reopened this Oct 12, 2014
@queso
Copy link
Member

queso commented Oct 12, 2014

What is the data context when you make the call for shareit? Could be that you are not passing in the right context because it expects this.data to be an object that reponds to url, title, and excerpt.

You could do it like this:

{{> sharit data=dataObjectHelper }}

Then just setup an object in your helpers that responds with the right kind of object...

@isAlmogK
Copy link
Author

Thanks yes I was'nt passing anything just doing {{< shareit}}
I got the URL working but not the title and excerpt

I'm doing the following:

dataObjectHelper: function() {
        return {url:document.URL,title:this.title,excerpt:this.shortDescription};
    }

But for twitter I get this
undefined http://localhost:3000/Almog/startup-accelerator-programs/new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants