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
Comment #2
kevinquillen CreditAttribution: kevinquillen at Velir commentedIf 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.
Comment #3
chrisroane CreditAttribution: chrisroane commentedThanks 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.
Comment #4
kevinquillen CreditAttribution: kevinquillen at Velir commentedI 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.
Comment #5
kevinquillen CreditAttribution: kevinquillen at Velir commentedComment #6
kevinquillen CreditAttribution: kevinquillen at Velir commented