These are chat archives for reactioncommerce/reaction

26th
May 2016
Lukas Sägesser
@ScyDev
May 26 2016 14:12
Is there already a route that simply displays a full page sign up/register ?
krestt
@krestt
May 26 2016 14:13
There is meteor package for that
Lukas Sägesser
@ScyDev
May 26 2016 14:14
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
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
@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
@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
@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
try this instead
ReactionLayout({
      layout: "coreLayout",
      template: "loginFormSignUpView",
    });
in place of BlazeLayout.render
Valery Orloff
@valorloff
May 26 2016 14:26
<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
stored in mongo
Lukas Sägesser
@ScyDev
May 26 2016 14:27
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
Introduced in 0.12
and you should have it, if you have ReactionRouter
Lukas Sägesser
@ScyDev
May 26 2016 14:28
I guess I forked right between ReactionRouter and ReactionLayout
Lukas Sägesser
@ScyDev
May 26 2016 14:31
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
@ScyDev :thumbsup:
Valery Orloff
@valorloff
May 26 2016 14:32
which is CollectionFS package, where url-function code is in?
Mike Murray
@mikemurray
May 26 2016 14:35
@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
how making url of image (<img src="{{url}}") in your code?
This message was deleted
Mike Murray
@mikemurray
May 26 2016 14:48
      {{#with media}}
        <img src="{{url store='large'}}">
      {{else}}
        <img src="/resources/placeholder.gif">
      {{/with}}
Valery Orloff
@valorloff
May 26 2016 14:51
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
FS.File method? where is code of it?
Valery Orloff
@valorloff
May 26 2016 15:07
i want change url function for use direct links to external images, any help?
Mike Murray
@mikemurray
May 26 2016 15:09

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
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
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
check, what pwd and login you input? it should be come from first RC install black screen )
erendira
@erendira
May 26 2016 16:47
we use the same user and password and we haven't had that problem before
Spencer Norman
@spencern
May 26 2016 16:48
@erendira are you seeing this issue on your local as well or just after building for deployment?
erendira
@erendira
May 26 2016 16:49
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
and there’s nothing in your logs indicating any errors?
erendira
@erendira
May 26 2016 16:51
nop
Spencer Norman
@spencern
May 26 2016 16:51
Are you deploying a tarball or using some type of deployment service?
erendira
@erendira
May 26 2016 16:52
meteor up
Spencer Norman
@spencern
May 26 2016 16:53
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
12
0.12
Spencer Norman
@spencern
May 26 2016 16:56
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
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
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
are you on stock reaction or customized?
erendira
@erendira
May 26 2016 17:05
customized because of the client needs
and we have to launch the site next week
Spencer Norman
@spencern
May 26 2016 17:06
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
just check the roles and everything looks ok
hrath2015
@hrath2015
May 26 2016 17:31
then not sure. Try redeploy.
munireusa
@munireusa
May 26 2016 19:21
need a recommendation - what is the best blog to use with reaction? keystone.js???
munireusa
@munireusa
May 26 2016 20:41
2nd best CMS node.js system
erendira
@erendira
May 26 2016 23:23
Hello guys can you give a clue on how to add an admin from mongo?
Spencer Norman
@spencern
May 26 2016 23:37
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
ah ok, got it @spencern thanks