These are chat archives for reactioncommerce/reaction

2nd
Feb 2018
William Moss
@willmoss1000
Feb 02 2018 02:12
first time using this permission setup - could anyone help me out and let me know why the below isn't changing when in sign in/out. It's on the products page.
const SellerContact = (props, hasPermissions) => {

  if (hasPermissions) {
    return (<div className="shop-title-container">
      <div className="shop-name">
    do not have permission
      </div>
    </div>);
  }

  return (
    <div className="shop-title-container">
    Shop Contact Details
      <div className="shop-name">
        {props.shopDetails.name}
        have permission to see this
      </div>
    </div>
  );
};

SellerContact.propTypes = {
  children: PropTypes.node,
  i18nKeyMessage: PropTypes.string,
  i18nKeyTitle: PropTypes.string
};

registerComponent("SellerContact", SellerContact, withPermissions({ group: ["customer"] }));

export default withPermissions(SellerContact);
i want hasPermissions to be true if the user has an account
currently it is doing nothing at all when i sign in / out
Sebastian Alvarado
@sebasalvarado
Feb 02 2018 05:05
@zenweasel Thanks for confirming. I will give it a new try. Maybe I was too tired last night
aniwebcastle
@aniwebcastle
Feb 02 2018 05:57
Need a help, I have my custom theme, I want to integrate full backend functionality that reaction uses with my custom theme, but can't get any point. How can i get that? Please let me know if anyone can?
aniwebcastle
@aniwebcastle
Feb 02 2018 08:14
In core theme in layout folder i have given below js in register.js
Reaction.registerPackage({
label: "Layout",
name: "reaction-layout",
icon: "fa fa-object-group",
autoEnable: true,
settings: {
name: "Layout"
},
registry: [{
provides: ["dashboard"],
label: "Layout",
layoutFooter: "Footer",
description: "Layout utilities",
icon: "fa fa-object-group",
priority: 1,
container: "appearance"
}]
});
addded layout footer
layoutFooter: "Footer",
and in footer i have put below code
const Footer = () => (
<div className="reaction-navigation-footer footer-default">
<nav className="navbar-bottom" role="navigation">
<div className="row">
hhhhhhhhhhhhhhhh
</div>
</nav>
</div>
);
but it is not coming at all
image.png
I hope the layout folder in core theme in first hit?
aniwebcastle
@aniwebcastle
Feb 02 2018 08:37
@zenweasel @prinzdezibel please help me in this
Lorenzo Campanis
@lcampanis
Feb 02 2018 08:41
@aniwebcastle Have you checked that your entries have been added in monogDB in the Packages collection for package: reaction-layout
If not, then check that first.
If you can't see them under the reaction-layout package, then you can reaction reset -n or add them manually
MichaelF77
@MichaelF77
Feb 02 2018 08:45
question: when do settings from settings/dev.settings.json get applied to reaction?
I am starting it with just "reaction" and they do not appear to have effect
related: what is default email for the admin ?
and default password
I'd thought it's admin@local and pass
but does not appear to be working
Michael Jenny
@prinzdezibel
Feb 02 2018 08:46
@MichaelF77 There are two ways of passing admin credentials:
env variables and Meteor.settings.
evn variable have precedence
MichaelF77
@MichaelF77
Feb 02 2018 08:48
I checked - I do not have REACTION_EMAIL and REACTION_AUTH defined
Michael Jenny
@prinzdezibel
Feb 02 2018 08:48
does console output say that it picked the dev.settings.json?
MichaelF77
@MichaelF77
Feb 02 2018 08:49
I do not see anything to that extent
Michael Jenny
@prinzdezibel
Feb 02 2018 08:49
start reaction and you should see a log line
Using settings file at settings/settings.json
MichaelF77
@MichaelF77
Feb 02 2018 08:49
ah yes I see it now
yes, it is reading them from the dev.settings.json
but email I specified there does not work as login to the shop
Michael Jenny
@prinzdezibel
Feb 02 2018 08:50
ok. it could be that the account is already created for whatever reasson
MichaelF77
@MichaelF77
Feb 02 2018 08:51
so that would be admin account, correct?
Michael Jenny
@prinzdezibel
Feb 02 2018 08:51
reset the database again with reaction reset -n and start over from scratch
with reaction --settings settings/dev.settings.json
MichaelF77
@MichaelF77
Feb 02 2018 08:51
I don't want to reset database because I have bunch of test data loaded that I'd like to keep :(
Michael Jenny
@prinzdezibel
Feb 02 2018 08:52
and you should be able to log in with the credentials you have passed.
I guess the admin account password/email was changed
MichaelF77
@MichaelF77
Feb 02 2018 08:53
that's actually is a minor problem, because I got another user admin priveledges by copying the permissions
my major problem is that my front page of the store does not load and I have no idea why
I can work around it hanging by doing http://jonesfeed.feedsystech.com:3000/tag/123
is there a way to debug it?
I do not see any errors in console
Michael Jenny
@prinzdezibel
Feb 02 2018 08:54
did you overwrite a React component?
MichaelF77
@MichaelF77
Feb 02 2018 08:55
no
Michael Jenny
@prinzdezibel
Feb 02 2018 08:55
is it a stock reaction?
MichaelF77
@MichaelF77
Feb 02 2018 08:55
in fact I just did react pull
yes
but DB is not stock, I have a lot of data in it populated
Michael Jenny
@prinzdezibel
Feb 02 2018 08:55
it's waiting for subscription to be ready. something 's not ok with your data, I guess.
MichaelF77
@MichaelF77
Feb 02 2018 08:55
any way to find out what?
Michael Jenny
@prinzdezibel
Feb 02 2018 08:55
any server console error?
MichaelF77
@MichaelF77
Feb 02 2018 08:56
no
aniwebcastle
@aniwebcastle
Feb 02 2018 08:56
@lcampanis
image.png
I have done reaction reset -n, but it not worked
MichaelF77
@MichaelF77
Feb 02 2018 08:58
re: user I see a new user was created on restart but without username or ID
I guess I'll have to reinitialize database :(
Michael Jenny
@prinzdezibel
Feb 02 2018 08:59
@MichaelF77 I have no idea, really. sounds a bit like corrupted data, but not sure about that
Lorenzo Campanis
@lcampanis
Feb 02 2018 09:00
Great @aniwebcastle so your layout is null and your structure incorrect.
Example from https://docs.reactioncommerce.com/reaction-docs/v1.6.4/plugin-layouts-3
layout: [{
  layout: "coreLayoutBeesknees",
  workflow: "coreProductGridWorkflow",
  collection: "Products",
  theme: "default",
  enabled: true,
  structure: {
    template: "products",
    layoutHeader: "NavBar",
    layoutFooter: "Footer",
    notFound: "productNotFound",
    dashboardHeader: "",
    dashboardControls: "dashboardControls",
    dashboardHeaderControls: "",
    adminControlsFooter: "adminControlsFooter"
  }
}]
Michael Jenny
@prinzdezibel
Feb 02 2018 09:00
@MichaelF77 Your site is freezing the tab !
MichaelF77
@MichaelF77
Feb 02 2018 09:00
yes it does
Michael Jenny
@prinzdezibel
Feb 02 2018 09:01
something's weird going on there
maybe it shuffles MB of data to the client?
there's clearly something wrong with your database
MichaelF77
@MichaelF77
Feb 02 2018 09:02
ok, thanks, I guess I will have to reinitialize
Michael Jenny
@prinzdezibel
Feb 02 2018 09:02
good luck
MichaelF77
@MichaelF77
Feb 02 2018 09:02
most likely removing tags made it so that all products appear in default "Reaction" tag
I have ~4000 products
(which is the chief reason I do not want to reset DB)
Michael Jenny
@prinzdezibel
Feb 02 2018 09:03
you may copy them over with a tool like robomongo and insert them later
MichaelF77
@MichaelF77
Feb 02 2018 09:03
sure
Michael Jenny
@prinzdezibel
Feb 02 2018 09:03
if you can ensure their integrity
MichaelF77
@MichaelF77
Feb 02 2018 09:04
I actually have a custom ERP system behind it, that's actually the crux of my project
thank you for your help, I guess I will bite the bullet and reinitialize
Patrick Newell
@pnewell4_twitter
Feb 02 2018 11:13
any suggestions for either 1) adding custom font icons or 2) upgrading FontAwesome?
wfhio
@wfhio
Feb 02 2018 12:18
@prinzdezibel hey there, i'm testing the change you made in https://github.com/reactioncommerce/reaction/pull/3640/ but am not having much success ... i've already cleared my database after making the change to be sure, but do i need to do any resetting in the browser console to see this change?
Michael Jenny
@prinzdezibel
Feb 02 2018 12:35
@wfhio did you check if this code is executed via console.log () ? It should be executed when you click "checkout as guest"
wfhio
@wfhio
Feb 02 2018 12:36
@prinzdezibel heh, i just added some console.logs but they're not firing ... so something is up
Michael Jenny
@prinzdezibel
Feb 02 2018 12:40
can you show me the code?
wfhio
@wfhio
Feb 02 2018 12:41
@prinzdezibel give me one sec, i just blew the app away to test from scratch
wfhio
@wfhio
Feb 02 2018 12:55
@prinzdezibel apologies, hitting some issues here and i need to run to drop off my car, i'll try this again as soon as i'm back and report if you're still around
Michael Jenny
@prinzdezibel
Feb 02 2018 12:55
Sure, cu later
William Moss
@willmoss1000
Feb 02 2018 13:24
@prinzdezibel @zenweasel are you familiar with the permissions setup? If so, could you help me understand why, when I show this on the products page, the permissions do not change when I sign in/out. I have tried with multiple groups/roles
  // ClassName for base wrapper,
  // If one is provided in props, the default is not used

  if (hasPermissions) {
    return (<div className="shop-title-container">
      <div className="shop-name">
    do not have permission
      </div>
    </div>);
  }

  return (
    <div className="shop-title-container">
    Shop Contact Details
      <div className="shop-name">
        {props.shopDetails.name}
        have permission to see this
      </div>
    </div>
  );
};

SellerContact.propTypes = {
  children: PropTypes.node,
  i18nKeyMessage: PropTypes.string,
  i18nKeyTitle: PropTypes.string
};

registerComponent("SellerContact", SellerContact, withPermissions({ roles: ["profile"] }));

export default withPermissions(SellerContact);
apologies
const SellerContact = (props, hasPermissions) => {

  if (hasPermissions) {
    return (<div className="shop-title-container">
      <div className="shop-name">
    do not have permission
      </div>
    </div>);
  }

  return (
    <div className="shop-title-container">
    Shop Contact Details
      <div className="shop-name">
        {props.shopDetails.name}
        have permission to see this
      </div>
    </div>
  );
};

SellerContact.propTypes = {
  children: PropTypes.node,
  i18nKeyMessage: PropTypes.string,
  i18nKeyTitle: PropTypes.string
};

registerComponent("SellerContact", SellerContact, withPermissions({ roles: ["profile"] }));

export default withPermissions(SellerContact);
this is definitely importing, just always shows the top section 'do not have permission'
Michael Jenny
@prinzdezibel
Feb 02 2018 13:56
@willmoss1000 no idea. looks ok to me
William Moss
@willmoss1000
Feb 02 2018 14:00
@prinzdezibel yep I'm pretty confused haha. There's nothing more in the docs, and the examples have typos in - so I'm not sure. I think it might have something to do with the context. hmmm
Harshal Yeole
@harshalyeole-tudip
Feb 02 2018 15:24
Is it possible to store images on Amazon s3 instead of CFS?
Michael Jenny
@prinzdezibel
Feb 02 2018 15:25
@harshalyeole-tudip We're in the progress of migrating away from CFS. The next incarnation of Reaction will provide means to host assets in the cloud.
right now, it's not an option supported out-of-the-box
Possibly CFS itself will still exist in future, but its role as only source of truth will diminish
Harshal Yeole
@harshalyeole-tudip
Feb 02 2018 15:27
Ok.
How much time it will take for you guys to give ability to store it on cloud?
haha
Michael Jenny
@prinzdezibel
Feb 02 2018 15:34
I'm not involved in time tables. Realistically I would say some time in Q2/Q3 2018
Harshal Yeole
@harshalyeole-tudip
Feb 02 2018 15:37
Okay
Thank You :)
William Moss
@willmoss1000
Feb 02 2018 16:23
@zenweasel do you have any idea why the above doesn't work?
would be much appreciated if you could take a look