These are chat archives for reactioncommerce/reaction

26th
Oct 2016
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 00:29
page doesn't load and I get the spinning beach ball
let me see if I can get more info, but usually I can't get dev tools to come up
in server/init.js do I need to add a line for changeLayouts(Reaction.getShopId(), "indexLayoutHydrotik");
Brent Hoover
@zenweasel
Oct 26 2016 00:38
you shouldn't
those settings are meant just for what you are doing
tdmoneybanks
@tdmoneybanks
Oct 26 2016 00:38
is there anything you have to do besides call Reaction.registerPackage() in order for a package to show up in the packages collection?
i have defined a package in the customs folder but i dont see my package in the db
Brent Hoover
@zenweasel
Oct 26 2016 00:39
is it at the root of /import/plugins/custom/<yourplugin>/?
you do need to restart using reaction for the plugin loader to pick it up
tdmoneybanks
@tdmoneybanks
Oct 26 2016 00:40
yea i restarted
and it lives at
/import/plugins/custom/plugin/core/
Brent Hoover
@zenweasel
Oct 26 2016 00:40
can’t be nested like that I don’t believe
tdmoneybanks
@tdmoneybanks
Oct 26 2016 00:40
so registry has to be at custom/plugin/
Brent Hoover
@zenweasel
Oct 26 2016 00:41
has to be /import/plugins/custom/<yourplugin>/register.js
it has to be at the root of your plugin
tdmoneybanks
@tdmoneybanks
Oct 26 2016 00:44
ill try that out
Brent Hoover
@zenweasel
Oct 26 2016 00:46
@hydrotik Is your repo current?
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 01:40
@zenweasel yep, just pushed. Kinda locks up
Brent Hoover
@zenweasel
Oct 26 2016 01:42
what’s the URL again?
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 01:44
debug.js:41 Error logging in with token: Error: You've been logged out by the server. Please log in again. [403]
when I try to reload it locks up
Brent Hoover
@zenweasel
Oct 26 2016 01:44
that happens every time
that’s totally normal
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 01:45
page seems like it still is loading and hangs
safari I get beach ball
chrome can't even quit lol
fan comes on
Brent Hoover
@zenweasel
Oct 26 2016 01:45
what’s the URL?
Brent Hoover
@zenweasel
Oct 26 2016 01:48
loading
wow, that’s something
Brent Hoover
@zenweasel
Oct 26 2016 01:53
your plugin is a virus
the page did load
but then started gobbling up all CPU
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 01:58
lol
Brent Hoover
@zenweasel
Oct 26 2016 01:59
you must have some sort of infitite recursion going on somewhere is my only guess
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:01
do I need to another of these for the index layout?
changeLayouts(Reaction.getShopId(), "coreLayoutHydrotik");
I'm renaming and trying again
I might have found it
not found was different
Brent Hoover
@zenweasel
Oct 26 2016 02:07
Removing setting the INDEX_OPTIONS returns everything to normal
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:10
yeah that didn't seem to work
my test
Session.set("INDEX_OPTIONS", {
  template: "homeLayoutHydrotik",
  layoutHeader: "layoutHeaderHydrotik",
  layoutFooter: "layoutFooterHydrotik",
  notFound: "productNotFound",
  dashboardControls: "dashboardControls",
  adminControlsFooter: "adminControlsFooter"
});
removing that returns it to normal yes
I pushed what I did, but it didn't seem to fix the issue
Brent Hoover
@zenweasel
Oct 26 2016 02:12
just doing this causes it to freak:
Session.set("INDEX_OPTIONS", {
  template: "indexLayoutHydrotik",
});
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:14
i wonder if it is trying to put the index layout in the core layout? only recursive thing I can think of
Brent Hoover
@zenweasel
Oct 26 2016 02:14
that’s what I was thinking too
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:14
doesn't make sense though.. both templates are at the same level in the dom
Brent Hoover
@zenweasel
Oct 26 2016 02:15
using the word template is a little confusing there
is it supposed to be a layout template?
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:15
unless index only changes template=template
Brent Hoover
@zenweasel
Oct 26 2016 02:15
yeah, that must be it
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:16
so I need to reorg my templates so that core is the full template
and the hero is in index
let me give that a shot, but that makes sense
Brent Hoover
@zenweasel
Oct 26 2016 02:17
yeah, so to go back to your question about the home layout, I guess you would need to change the layout record if you want to change the layout for the homepage as well
yeah, recursive templates would fit the behavior
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:17
is there a place that shows all the constants for Session.set?
that might help give a little context
Brent Hoover
@zenweasel
Oct 26 2016 02:18
constants?
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:18
"INDEX_OPTIONS"
"DEFAULT_LAYOUT"
Brent Hoover
@zenweasel
Oct 26 2016 02:18
that’s them
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:18
just those?
Brent Hoover
@zenweasel
Oct 26 2016 02:18
afaik yes
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:18
ok
so if eventually a category landing page came, maybe that would be set there?
maybe getting off topic lol
Brent Hoover
@zenweasel
Oct 26 2016 02:19
set where?
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:20
Session.set("CATEGORY_LANDING_LAYOUT", {});
something like that..
Brent Hoover
@zenweasel
Oct 26 2016 02:20
No, use of Session is deprecated. We literally can’t add it to our code anymore
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:20
ok
so core is the parent
Brent Hoover
@zenweasel
Oct 26 2016 02:20
I don’t know what the solution will be exactly, but I know it won’t be that
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:21
index is the home that is passed to template=template
Brent Hoover
@zenweasel
Oct 26 2016 02:21
the logical thing would be that you could override the layout in the INDEX_OPTIONS
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:21
then the contents of template=template are passed to the inside of index
Brent Hoover
@zenweasel
Oct 26 2016 02:21
yeah
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:21
right
ok makes sense
this helps:)
let me give that a shot and I'll make my notes in my README
Brent Hoover
@zenweasel
Oct 26 2016 02:22
I’m a little surprised that Meteor didn’t pick up on the recursion and save you from yourself
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:22
yeah
i'm finding the errors to be a little less verbose than I would like
same thing from back when I was getting that weird 404 issue
thanks for the help as always
Brent Hoover
@zenweasel
Oct 26 2016 02:23
every template system I have used tends to feel like a kludge to me
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:23
I feel like a lot of this could be in react anyways
Brent Hoover
@zenweasel
Oct 26 2016 02:23
PR’s are welcome
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 02:23
duly noted:)
going to give this a shot, I might be on a bit later.. cheers!
Brent Hoover
@zenweasel
Oct 26 2016 02:25
ttyl
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:41
yeah i think there is a bug here. i tried to split it off, but it didn't solve the problem
expected result would be the template=template value be replaced on the index page
which would mean the entire page template switches out
otherwise you would need to do this...
Session.set("INDEX_OPTIONS", {
  templateHome: "homeLayoutHydrotik"
});
if that makes sense
Brent Hoover
@zenweasel
Oct 26 2016 03:45
you’re only changing what is displayed here:
    <main role="main" id="main">
      <span id="layout-alerts">{{> inlineAlerts}}</span>
      {{#if hasPermission 'guest'}}
        <!-- begin template region -->
        {{> Template.dynamic template=template}}
        <!-- end template region -->
      {{/if}}
Michael Duane Mooring
@mikeumus
Oct 26 2016 03:45
Hey Gang, getting a missing module ./browser after a rc pull and then rc up: https://stackoverflow.com/questions/40253355/meteor-reactioncommerce-error-cannot-find-module-browsers
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:46
i did try that and also template=templateHome
but again, I would expect the entire page to switch out
Brent Hoover
@zenweasel
Oct 26 2016 03:47
it only switches out what is in that <main> section
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:47
which seems to be working for admin
Brent Hoover
@zenweasel
Oct 26 2016 03:47
that’s why those other entries are there, otherwise there would be no use for them
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:48
<template name="coreLayoutHydrotik">
{{#if hasDashboardAccess}}
  {{> coreAdminLayout}}
{{else}}
  {{> CustomPromo}}
    <nav class="reaction-navigation-header">
      <!-- begin layoutHeader -->
      {{> Template.dynamic template=layoutHeader}}
      <!-- end layoutHeader -->
    </nav>
    <nav class="reaction-cart-drawer">
      {{>cartDrawer}}
    </nav>

  <main role="main" id="main">
    <span id="layout-alerts">{{> inlineAlerts}}</span>
    {{#if hasPermission 'guest'}}
      <!-- begin template region -->
      {{> Template.dynamic template=template}}
      <!-- end template region -->
    {{/if}}

    {{> Template.dynamic template=layoutFooter}}
  </main>

{{/if}}
</template>
Brent Hoover
@zenweasel
Oct 26 2016 03:49
uh-huh
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:49
<template name="homeLayoutHydrotik">
  {{> CustomHero}}
  {{> Template.dynamic template=template}}
</template>
Brent Hoover
@zenweasel
Oct 26 2016 03:49
is your layout getting used?
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:49
didn't work that way
yes it is, but home isn't loading
Brent Hoover
@zenweasel
Oct 26 2016 03:50
I guess I am not understanding what you are expecting
it seems like it’s clearly doing what it should be doing
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:50
index should show the carousel
Brent Hoover
@zenweasel
Oct 26 2016 03:51
your code there clearly won’t do that
I think you want to override the layout
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:52
yes, I would assume that.. this was just to nest the home contents with the carousel in it
```
<template name="homeLayoutHydrotik">
{{#if hasDashboardAccess}}
  {{> coreAdminLayout}}
{{else}}
  {{> CustomPromo}}
    <nav class="reaction-navigation-header">
      <!-- begin layoutHeader -->
      {{> Template.dynamic template=layoutHeader}}
      <!-- end layoutHeader -->
    </nav>
    <nav class="reaction-cart-drawer">
      {{>cartDrawer}}
    </nav>

  <main role="main" id="main">
    {{> CustomHero}}
    <span id="layout-alerts">{{> inlineAlerts}}</span>
    {{#if hasPermission 'guest'}}
      <!-- begin template region -->
      {{> Template.dynamic template=template}}
      <!-- end template region -->
    {{/if}}

    {{> Template.dynamic template=layoutFooter}}
  </main>

{{/if}}
</template>
seemed more logical to me
not very dry though
Brent Hoover
@zenweasel
Oct 26 2016 03:53
I stil don’t get what you are trying to show me
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:54
maybe conditionalizing the carousel if it knows it's on index? Just wasn't sure there
home has the CustomHero in it which is the carousel
Brent Hoover
@zenweasel
Oct 26 2016 03:55
ok
I’m lost on what problem we are trying to solve. Sorry.
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:56
is there a var in the template that lets me know what page I am on
Brent Hoover
@zenweasel
Oct 26 2016 03:56
how are you defining “page”?
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 03:57
index page of the site url wise
I think overriding the index is what I am looking for
or a way to know the route value
which in root would be empty in the case of the index/home page
I might have any idea though
so if you just want to show the carousel on the home page, why is it just not in the indexHomepage template?
I feel like we are edging towards a solution that’s more complicated than it needs to be
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:00
yeah I think so
indexHomepage template is a core layout/template?
Brent Hoover
@zenweasel
Oct 26 2016 04:01
No
A template rendered here and provided in INDEX_OPTIONS
{{> Template.dynamic template=template}}
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:03
ok I got it working _OPTIONS being the key word:)
<template name="coreLayoutHydrotik">
{{#if hasDashboardAccess}}
  {{> coreAdminLayout}}
{{else}}
  {{> CustomPromo}}
    <nav class="reaction-navigation-header">
      <!-- begin layoutHeader -->
      {{> Template.dynamic template=layoutHeader}}
      <!-- end layoutHeader -->
    </nav>
    <nav class="reaction-cart-drawer">
      {{>cartDrawer}}
    </nav>

  <main role="main" id="main">
    <span id="layout-alerts">{{> inlineAlerts}}</span>
    {{#if hasPermission 'guest'}}
      {{> Template.dynamic template=hero}}
      <!-- begin template region -->
      {{> Template.dynamic template=template}}
      <!-- end template region -->
    {{/if}}

    {{> Template.dynamic template=layoutFooter}}
  </main>

{{/if}}
</template>
import { Session } from "meteor/session";
import { Logger } from "/client/api";

Session.set("DEFAULT_LAYOUT", "coreLayoutHydrotik");

Session.set("INDEX_OPTIONS", {
  hero: "homeHero"
});
<template name="homeHero">
  {{> CustomHero}}
</template>
Brent Hoover
@zenweasel
Oct 26 2016 04:04
Hmmm, I am surprised that works
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:04
lol
Brent Hoover
@zenweasel
Oct 26 2016 04:05
oh wait, now I see
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:05
i would expect an error on non index page also
Brent Hoover
@zenweasel
Oct 26 2016 04:05
No, blaze just ignore variables w/o a value
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:05
i think there is a more elegant way to do this, but I'm not sure
ah ok good
Brent Hoover
@zenweasel
Oct 26 2016 04:06
I still don’t understand why you needed to do that, but if it works…..
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:07
i just want the hero/carousel on the home page.. I suppose I could use routes and conditionalize that with a dyadic React container
Brent Hoover
@zenweasel
Oct 26 2016 04:08
I don’t understand why you just don’t swap out the template and just have the hero in there
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:09
you are referring to that home template?
Brent Hoover
@zenweasel
Oct 26 2016 04:09
i.e. { template: indexPageWIthHero }
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:09
yeah that didn't seem to work
Brent Hoover
@zenweasel
Oct 26 2016 04:10
odd, since I am pretty sure a bunch of people are using that feature
and when I tried it here it worked as well
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:11
hmmm, back to the mystery issue for me it seems
Brent Hoover
@zenweasel
Oct 26 2016 04:11
:thinking_face:
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:11
so indexPageWIthHero would be a template that contains everything in the core but with the addition of the carousel?
Brent Hoover
@zenweasel
Oct 26 2016 04:11
No
Normally the template that gets rendered is “productGrid"
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:12
maybe I need a gist lol
ah
Brent Hoover
@zenweasel
Oct 26 2016 04:13
it has nothing to do with layouts
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:13
ok
Brent Hoover
@zenweasel
Oct 26 2016 04:13
so instead of poductGrid you render indexPageWithHero
that’s what you do when you supply the template value
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:14
got it
Brent Hoover
@zenweasel
Oct 26 2016 04:14
You could add something like
<h3>I’m rendering template {{template}} now!</h3>
as a way to see what’s going on
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:15
<template name="productListGridBeesKnees">
  <div class="row">
    {{>productGrid products=products}}
    {{#if hasPermission "createProduct"}}
      {{>productList}}
    {{/if}}
  </div>
</template>
Brent Hoover
@zenweasel
Oct 26 2016 04:15
at least that’s what I do
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:15
in your example
yeah I keep forgetting to do that
Brent Hoover
@zenweasel
Oct 26 2016 04:15
yeah, in my example I am just substituting one product grid for another product grid
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:16
right
Brent Hoover
@zenweasel
Oct 26 2016 04:16
that probably doesn’t help make it clear
but that template could contain anything
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:17
actually it is productsLanding
Brent Hoover
@zenweasel
Oct 26 2016 04:17
yeah
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:17
OK, which is there with the template in register.js lol duh
Brent Hoover
@zenweasel
Oct 26 2016 04:18
Right, althought that’s a little different
Normally if you want to change a template you need to do for a layout + workflow
but INDEX_OPTIONS gives you a way to do that for index without getting into all that
as a special one-off basically
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:21
ah ha
that was a helpful block of logic
Brent Hoover
@zenweasel
Oct 26 2016 04:22
if you really want to understand layouts and routing in Reaction, that’s the file to understand
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:22
ok
that helps a lot
I am trying to note this in my README
so all this time I'm bothering you well hopefully put to some good use be someone lol
Brent Hoover
@zenweasel
Oct 26 2016 04:23
Making this stuff with layouts easier is a priority for us
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:23
I think getting rid of blaze and going all out with React components might help
just my thought
Brent Hoover
@zenweasel
Oct 26 2016 04:24
It’s not as straight-ahead as I would like it to be, especially since it’s like the 2nd thing that everybody wants to do
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:24
yeah
Brent Hoover
@zenweasel
Oct 26 2016 04:24
it’s actually more a conceptual issue. Of layouts, workflows, etc
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:24
right
Brent Hoover
@zenweasel
Oct 26 2016 04:25
how you render it in the view layer is sort of the least of your worries
anyway, I”m glad you got it working
I don’t think my machine ever recovered from your plugin, I need to reboot now
Donovan Adams - Hydrotik
@hydrotik
Oct 26 2016 04:27
yes, thank you. have some tweaking to do, but this will keep me moving
lol very sorry.. maybe force quit the browsers
i had to do that
Frank Gutierrez
@dearfrankg
Oct 26 2016 05:42
@zenweasel wow you've been busy today!
Today was about reading the docs for me.
Brent Hoover
@zenweasel
Oct 26 2016 05:43
@dearfrankg And how’d that go?
Frank Gutierrez
@dearfrankg
Oct 26 2016 05:44
there was a lot more than I anticipated. some good stuff
Brent Hoover
@zenweasel
Oct 26 2016 05:48
Cool
Frank Gutierrez
@dearfrankg
Oct 26 2016 05:50
yeah, it's impressive.
Started running this week so I need to catch some sleep zzzzz
Seeya tomorrow
Brent Hoover
@zenweasel
Oct 26 2016 05:50
ttyl
samgitre
@samgitre
Oct 26 2016 07:16
hello, bro
good day
yesterday I later discovered my mistakes
it was a template with a wrong name
so I just did the correction
but now the problem I'm having is how to reference image from my img directory
the image is in public/img/
I have tried the usual way but it did not appear
Brent Hoover
@zenweasel
Oct 26 2016 07:47
public in the root of the project?
samgitre
@samgitre
Oct 26 2016 08:10
yes
Brent Hoover
@zenweasel
Oct 26 2016 08:14
should work then
your reference should always be relative to public
samgitre
@samgitre
Oct 26 2016 08:18
I have done that but it refused to show up
Brent Hoover
@zenweasel
Oct 26 2016 08:19
not sure. You can see we refer to placeholder.gif which is stored in public/resources
samgitre
@samgitre
Oct 26 2016 08:28
exactly
I saw it
But i don't know why this one is not coming up
Brent Hoover
@zenweasel
Oct 26 2016 08:37
if you put your code up in a repo I can take a look at it, otherwise I don’t know what to tell you
samgitre
@samgitre
Oct 26 2016 08:46
I understand
I will try to organize it and put in a repo
samgitre
@samgitre
Oct 26 2016 10:53
Working, bro
/img/image.jpg
I was using img/image.jpg
thanks for your time
it was my mistake
Thanh Le
@dainhan90_twitter
Oct 26 2016 11:11
Hi, i get error when start reaction :.meteor/packages/meteor-tool/.1.4.1_2.354htk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:165
throw error;
please help me?
Brent Hoover
@zenweasel
Oct 26 2016 11:38
@dainhan90_twitter You are getting that on a clean install or?
what do you see when you do reaction -v?
Thanh Le
@dainhan90_twitter
Oct 26 2016 14:44
I get : "Node: 6.8.1
NPM: 4.0.0
Reaction CLI: 0.4.21"
I will try to reinstall meteor
Mark Downey
@markdowney
Oct 26 2016 15:06
Hi all. Anybody knows if fast-render is automatically added to all routes if I uncomment it here: https://github.com/reactioncommerce/reaction/blob/master/.meteor/packages#L88 ?
Muhammed Ali
@CodeMuhammed
Oct 26 2016 20:02
Hello everyone. I am really excited to be here i am new to reaction code-base and I am yet to fully figure out the entry-point of the app. I would really appreciate any guidance.
Muhammed Ali
@CodeMuhammed
Oct 26 2016 20:36
Thanks @spencern
Dylan R. Pearson
@DylanRPearson_twitter
Oct 26 2016 20:40
Hello all, hope everyones day is going great. I was had a question concerning Stripe. As of now, does reactioncommerce only support the base version of Stripe or does it also support Stripe Connect?
Spencer Norman
@spencern
Oct 26 2016 20:54
The current implementation is just the base version of Stripe (Stripe Payments)
Dylan R. Pearson
@DylanRPearson_twitter
Oct 26 2016 20:59
Thank you @spencern
Sophie He
@sophiehe
Oct 26 2016 21:09
Hi everyone! We invite you to join us remotely on 11/3, 10am PST for the inaugural Reaction Action Meetup. We'll be live streaming demos, answering questions, and giving away free shirts. RSVP here: http://meetu.ps/31CWv7