Giter VIP home page Giter VIP logo

Comments (7)

khalwat avatar khalwat commented on June 2, 2024

In our discussions, you mentioned that you were unable to replicate this with a different project -- which is making me think this is something specific to your project.

Do you have any steps to reproduce that you can give me so I can attempt to replicate the bug, and fix it, if it is one?

from craft-seomatic.

stefanfriedrich avatar stefanfriedrich commented on June 2, 2024

Still checking if there is another project that's aggregating it's data in the same way. I'll come back to you as soon as I know.
Maybe important: worked on craft 3, error showed up after update to 4.

from craft-seomatic.

khalwat avatar khalwat commented on June 2, 2024

I've tried replicating this by setting up a Matrix block with a plain text field and a rich text field in it.

Then I set SEOmatic to pull the description from that Matrix field, and everything worked as expected. It extracted the text from the Matrix fields, and used them for the description.

Can you help me out here with what could possibly be different with your setup for this site?

Are you seeing this behavior on any other sites you're using SEOmatic on?

from craft-seomatic.

khalwat avatar khalwat commented on June 2, 2024

So I think I'm going to need a composer.json and db dump if I'm to attempt to diagnose this.

That or we do a video conf call:

https://savvycal.com/nystudio107/chat

from craft-seomatic.

khalwat avatar khalwat commented on June 2, 2024

okay yeah so likely something you're doing in your templates is affecting it, because I get the correct result using a generic index.twig:

<title>🚧 Home | Rotax Aircraft Engines</title><meta name="generator" content="SEOmatic">
<meta name="keywords" content="technology, create, finding, continue, pushes, aviation, innovation, we’re, bursting, ever-better, built, boundaries, aircraft, engine, performance">
<meta name="description" content="We have built – and continue to create – technology that pushes the boundaries of aircraft engine performance to take the piloting experience to the next…">
<meta name="referrer" content="no-referrer-when-downgrade">

So if you could send me the templates/ directory on Discord, I could be able to figure it out pretty easily.

from craft-seomatic.

khalwat avatar khalwat commented on June 2, 2024

Okay so it ends up being that the issue is that in this case, the Matrix blocks were being eager loaded in the templates via something like this:

{% do craft.app.elements.eagerLoadElements(
    className(entry),
    [entry],
    ['groupedEntryIntro']
) %}

...and then in the helper/Text.php class, it failed the is_array() test that was there because as of Craft 4, eager loaded elements return a Collection object.

from craft-seomatic.

khalwat avatar khalwat commented on June 2, 2024

Fixed in 4.0.45 -> https://github.com/nystudio107/craft-seomatic/releases/tag/4.0.45

from craft-seomatic.

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.