Giter VIP home page Giter VIP logo

Comments (6)

stephensilber avatar stephensilber commented on May 16, 2024 1

Thanks for the link! I figured out that my issue was related to the isDraft flag in the above getProduct query (my client had uploaded all of their products but had not set them as active). I did try to pull in the latest changes via that stack overflow post but I was looking at ~35-40 files with merge conflicts so quickly gave up on that. Gonna mark this as closed...thanks again for the quick responses.

from hull.

ndimatteo avatar ndimatteo commented on May 16, 2024

Hey there @stephensilber is this on the latest version of HULL or an older version?

It sounds like it's not reading the product object that is sent through so it's unable to generate the page.

Very hard to tell from this what the issue is.

from hull.

stephensilber avatar stephensilber commented on May 16, 2024

I think I generated this project ~3 weeks ago if that helps give an indication of what version it's on. It actually looks like the page object comes back null. Here's the data property printed out from the file above (/prodcuts/[slug].js)

{
  page: null,
  site: {
    cart: {
      message: 'Free shipping on orders over $666',
      storeURL: 'https://shop.hull.dev'
    },
    cookieConsent: {
      enabled: true,
      link: [Object],
      message: 'We use cookies to personalize and deliver appropriate content.\n' +
        'By clicking "Accept" you agree to our terms.'
    },
    footer: { blocks: [Array] },
    header: {
      menuDesktopLeft: [Object],
      menuDesktopRight: [Object],
      menuMobilePrimary: [Object],
      menuMobileSecondary: [Object],
      promo: [Object]
    },
    productCounts: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
    rootDomain: 'https://soho-ski-club.vercel.app',
    seo: {
      metaDesc: 'A nature club for city dwellers. Discover premium basics for the adventure obsessed.',
      metaTitle: 'Soho Ski Club',
      shareDesc: 'A nature club for city dwellers. Discover premium basics for the adventure obsessed.',
      shareGraphic: [Object],
      shareTitle: 'Soho Ski Club',
      siteTitle: 'Soho Ski Club'
    }
  }
}

from hull.

ndimatteo avatar ndimatteo commented on May 16, 2024

Thanks @stephensilber, so I pushed a major update on sept 19, so if you pulled a copy before then you might be on an out-dated version I'm afraid. If so, would it be possible for you to rebuild with the latest version?

I'm not sure why your page object would be null, but that data is generated from here for product pages:

HULL/data/index.js

Lines 60 to 79 in 802f530

export async function getProduct(slug, preview) {
const query = `
{
"page": *[_type == "product" && slug.current == "${slug}" && wasDeleted != true && isDraft != true] | order(_updatedAt desc)[0]{
hasTransparentHeader,
modules[]{
${queries.modules}
},
"product": ${queries.product},
title,
seo
},
${queries.site}
}
`
const data = await getSanityClient(preview).fetch(query)
return data
}

That GROQ should be grabbing your product, which would give you data for the page object. Maybe that will help uncover what's missing on your end?

If you're on the latest, and still not able to figure it out, feel free to add me to your repo and sanity project so I can take a look locally.

from hull.

stephensilber avatar stephensilber commented on May 16, 2024

is there instructions on how I can rebase off of our latest changes without causing a bunch of issues on my end? I really appreciate the quick responses!!

from hull.

ndimatteo avatar ndimatteo commented on May 16, 2024

@stephensilber no problem!

Unfortunately, I don't have any specific instructions on how to do that but perhaps this would help:

https://stackoverflow.com/questions/56577184/github-pull-changes-from-a-template-repository

from hull.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.