Could you check the example (https://github.com/dpi/oh_blocks) for D8 & D9?
D8: Recurring Dates Field 8.x-2.2; oh 2.0.0-alpha5
D9: Recurring Dates Field 3.0.0-beta1; oh 2.0.0-alpha5
I get an error on both of them
D8:
TypeError: Argument 1 passed to Drupal\oh\OhDateRange::__construct() must implement interface DateTimeInterface, instance of Drupal\Core\Datetime\DrupalDateTime given, called in /var/www/vhosts/test.xyz.de/modules/av_oh_block/src/Plugin/Block/OhBlocksSampleA.php on line 107 in Drupal\oh\OhDateRange->__construct() (line 37 of modules/oh/src/OhDateRange.php).
D9:
Drupal\Component\Plugin\Exception\ContextException: The entity context is not a valid context. in Drupal\Component\Plugin\ContextAwarePluginBase->getContextDefinition() (line 92 of core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php).
Thanks
Comments
Comment #2
dpiHey, I dont intend to maintain that project, make sure you dont rely on it! Copy the code as you like.
DDT no longer used, use PHP's DT, per #3135388: Swap DDT to PHP DT. Changed this to 1.x per that ticket.
-
Issue is also for a different project, so closing.
Comment #3
heavystoneheadthanks for the link
here my changes (D8 tested):
I remove:
use Drupal\Core\Datetime\DrupalDateTime;and change this
$start = new DrupalDateTime('today 0:00');to
$start = new \DateTime('today 0:00');