IRC logs for #farmOS, 2020-10-03 (GMT)

2020-10-02
2020-10-04
TimeNickMessage
[22:58:08]* nickredmark[m] has joined #farmos
[02:17:18]* farmBOT has joined #farmos
[03:43:34]* mindcls[m] has quit (Ping timeout: 244 seconds)
[12:46:55]* skipper_is[m] has joined #farmos
[12:49:48]<skipper_is[m]>Good evening all o/
[12:50:42]<skipper_is[m]>I'm trying to hook into the animal's view/page thing
[12:51:21]<skipper_is[m]>trying to use the _entity_view_alter() hook but cannot seem to get anything to display..
[12:51:49]<mstenta[m]>Hi [skipper_is](https://matrix.to/#/@skipper_is:matrix.org)
[12:52:03]<mstenta[m]>Are you trying to add something new or change something already there?
[12:52:32]<skipper_is[m]>Add something new, I just put my DLWG patch into a separate module
[12:52:38]<mstenta[m]>For new stuff try this
[12:52:41]<mstenta[m]>https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
[12:53:56]<skipper_is[m]>With ENTITY_TYPE replaced by asset?
[12:54:15]<mstenta[m]>`farm_asset` yes
[12:54:42]<mstenta[m]>Then you can also add a check to make sure the bundle is `animal`
[12:54:55]<skipper_is[m]>Yea, I've got a if ($asset->type != 'animal') {
[12:55:10]<skipper_is[m]>(With asset comming off of $asset = $build['#entity'];
[12:58:24]<skipper_is[m]>> The website encountered an unexpected error. Please try again later.
[12:58:29]<skipper_is[m]>I'll try that again...
[12:59:02]<mstenta[m]> /admin/reports/dblog will show the error
[13:00:18]<skipper_is[m]>It doesn't like trying to pull the #entity from the $build....
[13:00:30]<skipper_is[m]>if (empty($build['#entity'])) {
[14:14:00]<skipper_is[m]>I assume it is https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func... rather than the 8x version
[14:14:07]<skipper_is[m]>But I cannot seem to get either of them to behave
[14:33:06]<skipper_is[m]>couldn't get it to behave, so went back to hook entity_view_alter
[14:33:23]<skipper_is[m]>No idea why...
[14:35:05]<skipper_is[m]>But is there a way of seeing the weighting of the different elements of the view? For some reason -120 weighting puts it in #1 position
[15:09:41]<skipper_is[m]>ACTION uploaded an image: image.png (132KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/ZOAYDzjudUOuQwLn... >
[15:09:45]<skipper_is[m]>Why will you not go into column 2?!