How to use spiderable and iron-router on meteor.com


#1

Hi.

I am using iron-router (and iron-router-i18n) in my app and want to use spiderable.
However I get a following page by ?_escaped_fragment_=

TypeError: 'undefined' is not a function (evaluating 'n[i].bind(this)')
http://mimiaka.meteor.com/72e23bf30bab285e3c6053ae6dc0e98a0296188b.js?meteor_js_resource=true:208
...
<link ...>
<meta ...>
...

iron:router
Organize your Meteor application.

Router.route('/', function () {
        this.render('Home', {
        data: function () { return Items.findOne({_id: this.params._id}); }
    });
});
    
Check it out on Github:
https://github.com/eventedmind/iron-router 

And check out the new Guide:
https://iron-meteor.github.io/iron-router

The content in head tag is empty and it seems to output the content of head into body by accident.

It works well if I deployed by meteor deploy --debug, but in this case, the app itself becomes extremely slow for loading.
How can I fix it?


#2

I googled and found a similar case

But I have no idea of place to put a shim for Function.prototype.bind.
Where can I put it to load it before Meteor code?


#3

My app has haven a long life.
Adding es5-shim resolved it.


#4

@arunoda will tell you that Google deprecated the tech behind spiderable. Actually, now Google can read meteor apps as long as you use fast render.


#5

orz…^^;
Thank you for important information!
Fortunately, I am using fast render, but the search result is not good…
I guess that blocking by login shows google loading page.


#6

日本人ですか?東京に住んでいましたか?


#7

Yes, I am a Japanese, but unfortunately I am living in country side of Japan, not Tokyo.
Tokyo is too far for me to join one meeting…


#8

Ok, I have this problem as well and I am completely lost. Besides this thread I found some info, but nothing works. I have 2 clear situations in which the mentioned error message occurs: Google only indexes some of my pages properly, but the main page will show the error in the description, see image. Second case: when I try to share a page on Facebook, same thing (the other image).

Yes, I am on an older version of Meteor (pre-react). Can’t change that (of course I can change it, but haven’t got the time right now). I tried the ‘PhantomJS is missing Function.prototype.bind’ solution: no dice.

Any piece of information or tip is welcome. Please be verbose, I probably need more than half a sentence since I am deep in the f#ck1ng woods on this one. I don’t get it, I don’t know where to look. I am a desperate man.


#9

If you know something that might help, but need additional info on what I use, or particular snippets of code: let me know. Thanks.