These are chat archives for reactioncommerce/reaction

26th
May 2016
Lukas Sägesser
@ScyDev
May 26 2016 14:12 UTC
Is there already a route that simply displays a full page sign up/register ?
krestt
@krestt
May 26 2016 14:13 UTC
There is meteor package for that
Lukas Sägesser
@ScyDev
May 26 2016 14:14 UTC
I mean within Reaction. Sometimes, if the session is invalid for a certain page, a full page login is displayed, but I can't reproduce and can't find such a route.
Mike Murray
@mikemurray
May 26 2016 14:15 UTC
There are pages with a login UI only. @ScyDev, correct, Its usually the 403 (not authorized) pages, but you could do so easily by adding your own rote.
Lukas Sägesser
@ScyDev
May 26 2016 14:17 UTC
@mikemurray Can you tell me off the top of your head how I can render "loginFormSignUpView" within coreLayout (or my replacement of that) ?
BlazeLayout.render("snaxterLayout", "loginFormSignUpView");
doesn't work.
BlazeLayout.render("loginFormSignUpView"); displays the sign up, but doesn't frame it with the core layout.
Mike Murray
@mikemurray
May 26 2016 14:19 UTC
@ScyDev did you want it on a route?
and does your 2nd param in BlazeLayout.render("snaxterLayout", "loginFormSignUpView"); need to be an object? like BlazeLayout.render('layout1', { top: "header", main: "postList" });
Lukas Sägesser
@ScyDev
May 26 2016 14:20 UTC
@mikemurray Yes, trying this at the moment:
ReactionRouter.route('/user/register', {
  action: function() {
    //BlazeLayout.render("coreLayout", "loginFormSignUpView"); // no worky
    BlazeLayout.render("snaxterLayout", {dynamic: "loginFormSignUpView", content: "loginFormSignUpView", template: "loginFormSignUpView"});
    //BlazeLayout.render("loginFormSignUpView"); // works, but without frame
  }
});
@mikemurray BlazeLayout.render("snaxterLayout", {main: "loginFormSignUpView"}); gives a 404
Even though BlazeLayout.render("loginFormSignUpView"); works.
Mike Murray
@mikemurray
May 26 2016 14:24 UTC
try this instead
ReactionLayout({
      layout: "coreLayout",
      template: "loginFormSignUpView",
    });
in place of BlazeLayout.render
Valery Orloff
@valorloff
May 26 2016 14:26 UTC
<img src="/assets/files/Media/qTfLj9FhD4x2a4zMG/image.jpg..
is it physical url address? or file blob stored in Mongo?
Mike Murray
@mikemurray
May 26 2016 14:26 UTC
stored in mongo
Lukas Sägesser
@ScyDev
May 26 2016 14:27 UTC
ReactionLayout is not defined and ReactionLayout doesn't appear in my code. Was that introduced after 0.12 ?
Mike Murray
@mikemurray
May 26 2016 14:27 UTC
Introduced in 0.12
and you should have it, if you have ReactionRouter
Lukas Sägesser
@ScyDev
May 26 2016 14:28 UTC
I guess I forked right between ReactionRouter and ReactionLayout
Lukas Sägesser
@ScyDev
May 26 2016 14:31 UTC
I guess I'll try it with registerPackage(), that way I have been able to display templates within the layout.
Thanks ;) @mikemurray
Mike Murray
@mikemurray
May 26 2016 14:31 UTC
@ScyDev :thumbsup:
Valery Orloff
@valorloff
May 26 2016 14:32 UTC
which is CollectionFS package, where url-function code is in?
Mike Murray
@mikemurray
May 26 2016 14:35 UTC
@valorloff yes, and example
Template.myTemplate.helpers({
  media: function () {
    const media = ReactionCore.Collections.Media.findOne({
      "metadata.productId": this._id,
      "metadata.priority": 0,
      "metadata.toGrid": 1
    }, { sort: { uploadedAt: 1 } });

    return media instanceof FS.File ? media : false;
  },
  additionalMedia: function () {
    const mediaArray = ReactionCore.Collections.Media.find({
      "metadata.productId": this._id,
      "metadata.priority": {
        $gt: 0
      },
      "metadata.toGrid": 1
    }, { limit: 3 });

    if (mediaArray.count() > 1) {
      return mediaArray;
    }
    return false;
  }
});
you make the media helper yourself, the URL is part of the data you sent to the template
Valery Orloff
@valorloff
May 26 2016 14:40 UTC
how making url of image (<img src="{{url}}") in your code?
This message was deleted
Mike Murray
@mikemurray
May 26 2016 14:48 UTC
      {{#with media}}
        <img src="{{url store='large'}}">
      {{else}}
        <img src="/resources/placeholder.gif">
      {{/with}}
Valery Orloff
@valorloff
May 26 2016 14:51 UTC
in cfs.Media.filerecord in image docs i don't find any field with url, how it is made?
in your code <img src="{{url store='large'}}"> we are see "url", where does it come from? helper? where is code of that helper?
Valery Orloff
@valorloff
May 26 2016 15:02 UTC
FS.File method? where is code of it?
Valery Orloff
@valorloff
May 26 2016 15:07 UTC
i want change url function for use direct links to external images, any help?
Mike Murray
@mikemurray
May 26 2016 15:09 UTC

collection fs can do external images. you need to configre that though: https://github.com/CollectionFS/Meteor-CollectionFS#storage-adapters

If you want something more custom, you might have to build it yourself, or find an npm module than can

Valery Orloff
@valorloff
May 26 2016 16:12 UTC
ok, I want to look inside URL function (from imageDetail template) and change it )
how to find it? )
erendira
@erendira
May 26 2016 16:37 UTC
Hello everybody, we are having a problem with our staging server
When we log in with a user who is not the admin everything is fine
But when we log in with the admin it doesn't allow us to log in
and the server start to consume the 100% of resources
Does anyone had this problem before?
Valery Orloff
@valorloff
May 26 2016 16:43 UTC
check, what pwd and login you input? it should be come from first RC install black screen )
erendira
@erendira
May 26 2016 16:47 UTC
we use the same user and password and we haven't had that problem before
Spencer Norman
@spencern
May 26 2016 16:48 UTC
@erendira are you seeing this issue on your local as well or just after building for deployment?
erendira
@erendira
May 26 2016 16:49 UTC
just on the building for deployment, local everything is ok, the problem is in the staging server
Spencer Norman
@spencern
May 26 2016 16:49 UTC
and there’s nothing in your logs indicating any errors?
erendira
@erendira
May 26 2016 16:51 UTC
nop
Spencer Norman
@spencern
May 26 2016 16:51 UTC
Are you deploying a tarball or using some type of deployment service?
erendira
@erendira
May 26 2016 16:52 UTC
meteor up
Spencer Norman
@spencern
May 26 2016 16:53 UTC
hmm, I’ve not had any experience with mup, but I’ve also never seen what you’re describing. What version of Reaction are you on?
erendira
@erendira
May 26 2016 16:54 UTC
12
0.12
Spencer Norman
@spencern
May 26 2016 16:56 UTC
With the server consuming 100% of resources, it seems like you’re probably stuck in a loop that’s not terminating correctly when you’re logging in as admin. Can you make an additional admin (promote via db console?) and see if that user has the same problems?
hrath2015
@hrath2015
May 26 2016 16:58 UTC
please check in db if the admin has all roles populated as expected
in both shopid and global role
if not then it could be the problem. Due to timing issue admin was not created as expected.
erendira
@erendira
May 26 2016 17:03 UTC
ok, I'll check, but we are still confused that before it works ok and then suddenly it's not :(
Spencer Norman
@spencern
May 26 2016 17:03 UTC
are you on stock reaction or customized?
erendira
@erendira
May 26 2016 17:05 UTC
customized because of the client needs
and we have to launch the site next week
Spencer Norman
@spencern
May 26 2016 17:06 UTC
My guess is something wrong in your customized code as I’ve not heard of this happening and haven’t experienced it before. Have you tried switching out the admin for a different account? Not really sure what to recommend
We’re currently deployed on reaction and have staging servers as well, but have never seen this error
erendira
@erendira
May 26 2016 17:08 UTC
just check the roles and everything looks ok
hrath2015
@hrath2015
May 26 2016 17:31 UTC
then not sure. Try redeploy.
munireusa
@munireusa
May 26 2016 19:21 UTC
need a recommendation - what is the best blog to use with reaction? keystone.js???
munireusa
@munireusa
May 26 2016 20:41 UTC
2nd best CMS node.js system
erendira
@erendira
May 26 2016 23:23 UTC
Hello guys can you give a clue on how to add an admin from mongo?
Spencer Norman
@spencern
May 26 2016 23:37 UTC
you need to add “owner”, and “admin” to the list of roles that the user has for the correct store ID (and for __global__ if you wish to create a super-admin)
erendira
@erendira
May 26 2016 23:41 UTC
ah ok, got it @spencern thanks