I added a simple custom promoted option, which added fine. When I go to edit a content type, I receive this error:
Error: Call to undefined method Drupal\custom_pub\Entity\CustomPublishingOption::getNodeTypes() in custom_pub_form_node_type_edit_form_alter() (line 19 of /Users/chrisroane/www/lwi.local/.platform/local/builds/default/public/modules/contrib/custom_pub/custom_pub.module).

I can't really figure out where getNodeTypes() is supposed to be coming from? I'm looking for basic functionality to be able to set a promoted option on nodes for different use cases, and able to query for those nodes.

If this is a function that is missing in the entity, if you can give me some direction in what this should do, I can create a patch. I need this for a project we are working on now. Thanks.

Comments

chrisroane created an issue. See original summary.

kevinquillen’s picture

If this is the dev branch, it might be some cruft where I was trying to implement custom options for different node types. I will have to take a look, as I have not been able to work on CPO in a couple months.

chrisroane’s picture

Thanks Kevin. I tried with the Alpha and the dev version and it is in both. I would fix this myself, but I can't seem to figure out what that method is supposed to do or where it should be. Let me know if I can help out.

I can help maintain this project if you need help. I'm a PHP programmer. I just need to get a better understanding in how you have the code working. :) Thanks.

kevinquillen’s picture

I released a new version to fix this immediate issue.

It was supposed to be removed - it is where I was trying to figure out how we can port the functionality from 7 where you can define a CPO, but only for certain bundles. Things are a bit different in D8 in regards to how it works.

kevinquillen’s picture

Status: Active » Fixed
kevinquillen’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.