Closed dnish closed 8 years ago
Hi @dnish ,
Are you getting this at browser or server?
Does you have and/or use template named layout
?
@dr-dimitru I'm getting both errors on client side (browser).
Strange...
Does you have and/or use template named
layout
?
Yep, it is our default layout. It works everything fine when I'm not using the escapedfragment query. On the "normal" spiderable package, I get a Fibers error. Don't know if it has something to do with the error here?
@dnish which routing package are you using?
I'm using
iron:router
martino:iron-router-i18n
force-ssl
meteorhacks:fast-render
@dnish could you set Spiderable.debug = true
and run application from clean state after meteor reset
, and post here full console output?
Okay, I call
in my browser, my server logs the following:
=> Meteor server restarted
I20151219-18:58:06.933(1)? Spiderable successfully completed for url: [200] http://localhost:3000/de/
but I get
Couldn't find a template named "layout" or "layout". Are you sure you defined it?
as result in my browser.
If I call http://localhost:3000/de/ directly, everything works fine.
Hmm... post here all files related to Router
And where are you setting: Meteor.isReadyForSpiderable = true
?
I've set isReadyForSpiderable in my onRendered method.
This is my router.js:
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound',
i18n: {
langCodeForDefaultLanguage: false
}
});
Router.route('/', {
name: 'start',
fastRender: true,
yieldTemplates: {
'title':{to:'title'}
},
onBeforeAction: function () {
SEO.set({
title: TAPi18n.__("title"),
meta: {
'description': TAPi18n.__("meta")
}
});
this.next();
}
});
Router.route('/decide', {
name: 'decide',
waitOn: function () {
return [Meteor.subscribe('onlineUsers', likedUsers.array()), Meteor.subscribe('likes')]
}
});
Router.route('/chat', {
name: 'chat',
template:'chat_new',
waitOn: function () {
return [Meteor.subscribe('onlineUsers')]
},
onStop: function () {
try {
userConnection.close();
userCall.close();
} catch (e) {
}
}
});
var requireLogin = function () {
if (!Meteor.user() || !ownStream) {
Router.go('start');
} else {
this.next();
}
}
Router.onBeforeAction(requireLogin, {only: ['decide', 'chat']});
Okay, I've tested it with a blank project and the same packages - one package is causing this error, I'll report back until I've found that one.
@dr-dimitru materialize:materialize
is causing this error.
@dnish try to remove line with isReadyForSpiderable
let's see if it helps
@dr-dimitru I didn't use isReadyForSpiderable
in the new demo project. If I uncomment the materialize package, everything works fine again. Seems like Materialize is manipulating something that collides with the Spiderable package.
@dr-dimitru Removing it from the packages and adding it via Bower solved the problem on my dev machine, on my production environment I still get the default Iron Router page when I'm calling my site with escaped_fragment.
meteor run --production
on dev machine?@dr-dimitru If I run it by --production on the dev machine, I get the same error like on my production machine. I'm using MacOS on my dev machine and Ubuntu 14.04 on my production machine.
It display the Iron Router page that you will see if no routes are defined.
I think I got this.
Is routes defined in /lib
or /client
only?
Routes are defined in /lib/router/router.js
hmm..
Not wrapped into Meteor.startup()
?
Yep, routes aren't wrapped into Meteor.startup().
Let's try to define them in very top of the code, name file with prepended ___
(three underscored) and place it right in /lib
directory
I've to say that this problem only occurs in my current project, not in the new demo project - the demo project has the same router structure. I'll check out which part of my code will cause this error.
@dnish okay, let me know
@dr-dimitru My "bower" folder was in lib/bower, that caused the error. I've moved it into .meteor/local/bower, now it's working fine, thank you for your help :).
You are welcome
@dnish @jazeee looks like this issue is solved. Could we close this one?
@dr-dimitru Yep, we can close it.
I have the same problem, and many packages...
did you find why this problem exist?
i don't use materialize:materialize
meteor reset done
Spiderable.debug = true
Spiderable successfully completed for url: [200] http://localhost:3000/
i have removed ian:accounts-ui-bootstrap-3 package, now i have a blank page... like this? https://github.com/prerender/prerender/issues/214
https://forums.meteor.com/t/materialize-breaks-spiderable/7152/8
Hello @ddaydd
Could you post an error and its stacktrace, also it happens on Server or Client?
Original issue was solved with:
I've moved it into .meteor/local/bower, now it's working fine...
I had a package that contained a Class javascript, without having the ecmascript package in dependance, I added ecmascript, everything is good now, thanks
Hey guys, I'm getting the following error when I try to call my page with
?_escapedfragment=
It works fine without the escaped fragment. Anybody knows what causes this error?
When I deploy my application and I call it with escaped fragment, I only get the default Iron:Router page:
iron:router Organize your Meteor application.