Jump to content

Issue with followed content that don't have a container


LaCollision

Recommended Posts

Hi,

In my app, I've created Content Items that don't have a container (it's something possible, like the Status updates that don't belong to a container).

My Content Items are followable, so they implement IPS\Content\Followable.

However, I'm facing a bug with the "followed" section, available at the address "/followed".

In the file core/modules/front/system/followed.php, at line 96, there is a call to a new \IPS\core\Followed\Table().

And in this object, the construct() method calls the $className::$containerNodeClass property… which fires an exception 😭

 

=> Could it be possible, in this constructor, to check the presence of the $containerNodeClass property in the Content item?

If this property is not declared, then the join on the core_permission_index table would not be done.

 

Usually, throughout the Suite, the presence of the $containerNodeClass property is checked before calling it, to avoid such an error.

That would be really great to add that verification to the followed section.

Thank you!

Link to comment
Share on other sites

I had the same issue with my own app. I don't really need a container, but I had some issues similar to yours. I had to implement a dummy container as Adriano says to avoid errors. But I would also appreciate if there were a clear way to have content items without container if they are not really needed.

Link to comment
Share on other sites

Thank you very much @Adriano Faria and @Sonya*.

Too bad we're forced to create dummy containers for Content Items… that doesn't make sense. Especially knowing that in many areas of the code, the presence of the container is checked before calling it, allowing for Content Items to not have a container. That would be great to extend this verification everywhere in the Suite.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...