AdPlugin not compatible with changes to model?

I might be seeing things, but this component is expecting a model with a topic object contained:

However, when I log this model out, there is no longer a topic attribute?:

image

Is there a reason the topic attribute was removed? I was actually using it too for an extension to the adplugin :frowning:

2 Likes

Hi Robert - I don’t think this was intentional. Were you able to find out what @model is referring to? Would be good to work out whether it was a core or plugin change.

1 Like

Is it not taking the Post model passed down by the post-bottom connector?

{{post-bottom-ad model=this}}

That said, I performed a search for post-bottom on the discourse repo and it comes up blank … I’ll dig a bit more

1 Like

This seems very old code:

Which contains the topic object, so things change below this :sweat_smile:

2 Likes

Ok I see what happened here - thanks for the heads-up @merefield

Two things:

  1. During some refactoring a few months ago, we inadvertantly started passing the ‘transformedPost’ instead of ‘post’ into post-bottom-ad

  2. During the same refactoring, we left an old post-bottom/discourse-adplugin.hbs file lying around. It didn’t actually do anything, but it made this issue waaay more tricky to figure out :sweat_smile:

4 Likes

Is the perfect description :slight_smile:

The post stream UI architecture is quite a beast!

Thanks very much for looking into this!!

6 Likes

This topic was automatically closed after 4 days. New replies are no longer allowed.