These are chat archives for jescalan/roots

19th
Aug 2016
andrewgrano
@andrewgrano
Aug 19 2016 04:26
Hello, I ran into an issue with roots-wordpress and was hoping I could get some help! Each post is assigned one or more categories from within wordpress admin. On the roots site, my "post widgets" on the homepage correctly display the category/categories that are assigned to that post. However, the actual "post-view page" does not correctly do this. Instead, it just gives me a list EVERY category. It seems that the JSON being returned on this page is slightly different than on the homepage. I can't figure out why! Any assistance would be greatly appreciated. Here is the DEV site: https://dev-roaminglove.netlify.com/ (categories are highlighted in red so that its easy to identify what I'm talking about. I also included all the JSON data that is being returned). Also, here is the code on github: https://github.com/andrewgrano/roaminglove . Thanks!!
Jeff Escalante
@jescalan
Aug 19 2016 14:14
hey @andrewgrano so i definitely see the issue here
thanks for making it so clear
im not sure off the top whats causing it, especially if all the other data is coming through correctly
this is the line where single view templates are compiled in roots-wordpress
in order to avoid any sort of race condition, we run a deep clone of the individual post object
its hard for me to understand why it would correctly clone some of the object and not another part
Jeff Escalante
@jescalan
Aug 19 2016 14:27
would you be up for jumping in and digging a little further to try to figure out what's causing this?
if you log out the locals at the line I linked above, it might give some more insight
andrewgrano
@andrewgrano
Aug 19 2016 19:21
@jescalan - thanks for the response! I'm definitely down to dig deeper into this issue, however, I'm not very experienced in this kind of thing. Could you provide me with a little bit more direction on how to log out the locals and what I'd be looking for, or maybe provide me with some links to resources? Thanks again.
Jeff Escalante
@jescalan
Aug 19 2016 19:22
i did, right above
links into the source and such
let me know if you need more than that!
you just need to go into the local install of roots-wordpress or clone and npm link your own copy
then log out locals above that line i linked above, and take a look
have you ever worked with a node project before?
andrewgrano
@andrewgrano
Aug 19 2016 19:24
Haven't really worked in depth with a node project before. But I'm up for the challenge! I will start working on this later today!
Jeff Escalante
@jescalan
Aug 19 2016 20:53
awesome, here for support if you need it!