Whilst working on a different patch, I've noticed a bug that was introduced between 1.8 and 1.9.
In the 1.9 version of _simpleads_activate_deactive_ad()
there is a new $current_status = _simpleads_get_node_status($node->nid)
line that retrieves the current status of the ad node based on the node ID.
However, this function is called during simpleads_node_presave()
so there is no node ID yet to load which results in an "undefined property" error which are causing my tests to fail:
Undefined property: stdClass::$nid
My suggestion would be to change it to simply use $node->status
which then gets my tests to pass, but I'm not sure if that affects anything elsewhere and there are no tests in the simpleads module to run. I'll attach a patch for review.
It also might be good to use the NODE_PUBLISHED
and NODE_NOT_PUBLISHED
constants further down in this function, just for readability.
Closed: won't fix
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.