This is still active for me also. Composer.json attached what i used for test this.
Bug is appear when u move the Adjustments field from hidden to the visible region and hit the save button.
Yes, but the access_by_ref work with another logic, not with the common role based:
only gives access to view if the referenced field pass (eg. the visitor's uid is in the visited node's user reference field).
And nothing else: so we need any another module what deny the view of this node. And this is for example The Node Option Premium (wich deny the partial view) !
So yes, in this use case is not good to see the $entity->access('view') because we need to give the option to modules for use their own logic.
Therefore, i think, we need here invoke the hook_node_access only for specific (supported) modules.
Thanks for the answer! Then all of another modules need to implement the new hook.
I think there is better to look all of the another modules who implement hook_node_access (invokeAll('node_access')), if we want to support all node access modules what use hook_node_access to work.
There are the messages from Drupal:
Notice: Trying to access array offset on value of type null in Drupal\weather\Service\ParserService->updatePlaces() (line 259 of modules/contrib/weather-weather/src/Service/ParserService.php).
Drupal\weather\Service\ParserService->updatePlaces(Object) (Line: 179)
Drupal\weather\Service\ParserService->parseForecast(Object, 'geonames_3045190') (Line: 140)
Drupal\weather\Service\ParserService->downloadForecast('geonames_3045190') (Line: 475)
Drupal\weather\Service\ParserService->downloadWeather('geonames_3045190', 1678523825) (Line: 438)
Drupal\weather\Service\ParserService->getWeather('geonames_3045190', 0, 1) (Line: 128)
Drupal\weather\Service\ThemeService->preprocessWeatherVariables(Array, 1) (Line: 81)
template_preprocess_weather_detailed_forecast(Array, 'weather_detailed_forecast', Array)
call_user_func_array('template_preprocess_weather_detailed_forecast', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('weather_detailed_forecast', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Trying to access array offset on value of type null in Drupal\weather\Service\ParserService->updatePlaces() (line 259 of modules/contrib/weather-weather/src/Service/ParserService.php).
Drupal\weather\Service\ParserService->updatePlaces(Object) (Line: 179)
Drupal\weather\Service\ParserService->parseForecast(Object, 'geonames_3045190') (Line: 140)
Drupal\weather\Service\ParserService->downloadForecast('geonames_3045190') (Line: 475)
Drupal\weather\Service\ParserService->downloadWeather('geonames_3045190', 1678523825) (Line: 438)
Drupal\weather\Service\ParserService->getWeather('geonames_3045190', 0, 1) (Line: 128)
Drupal\weather\Service\ThemeService->preprocessWeatherVariables(Array, 1) (Line: 81)
template_preprocess_weather_detailed_forecast(Array, 'weather_detailed_forecast', Array)
call_user_func_array('template_preprocess_weather_detailed_forecast', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('weather_detailed_forecast', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Trying to access array offset on value of type null in Drupal\weather\Service\ParserService->updatePlaces() (line 260 of modules/contrib/weather-weather/src/Service/ParserService.php).
Drupal\weather\Service\ParserService->updatePlaces(Object) (Line: 179)
Drupal\weather\Service\ParserService->parseForecast(Object, 'geonames_3045190') (Line: 140)
Drupal\weather\Service\ParserService->downloadForecast('geonames_3045190') (Line: 475)
Drupal\weather\Service\ParserService->downloadWeather('geonames_3045190', 1678523825) (Line: 438)
Drupal\weather\Service\ParserService->getWeather('geonames_3045190', 0, 1) (Line: 128)
Drupal\weather\Service\ThemeService->preprocessWeatherVariables(Array, 1) (Line: 81)
template_preprocess_weather_detailed_forecast(Array, 'weather_detailed_forecast', Array)
call_user_func_array('template_preprocess_weather_detailed_forecast', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('weather_detailed_forecast', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Trying to access array offset on value of type null in Drupal\weather\Service\ParserService->updatePlaces() (line 262 of modules/contrib/weather-weather/src/Service/ParserService.php).
Drupal\weather\Service\ParserService->updatePlaces(Object) (Line: 179)
Drupal\weather\Service\ParserService->parseForecast(Object, 'geonames_3045190') (Line: 140)
Drupal\weather\Service\ParserService->downloadForecast('geonames_3045190') (Line: 475)
Drupal\weather\Service\ParserService->downloadWeather('geonames_3045190', 1678523825) (Line: 438)
Drupal\weather\Service\ParserService->getWeather('geonames_3045190', 0, 1) (Line: 128)
Drupal\weather\Service\ThemeService->preprocessWeatherVariables(Array, 1) (Line: 81)
template_preprocess_weather_detailed_forecast(Array, 'weather_detailed_forecast', Array)
call_user_func_array('template_preprocess_weather_detailed_forecast', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('weather_detailed_forecast', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Trying to access array offset on value of type null in Drupal\weather\Service\ParserService->updatePlaces() (line 266 of modules/contrib/weather-weather/src/Service/ParserService.php).
Drupal\weather\Service\ParserService->updatePlaces(Object) (Line: 179)
Drupal\weather\Service\ParserService->parseForecast(Object, 'geonames_3045190') (Line: 140)
Drupal\weather\Service\ParserService->downloadForecast('geonames_3045190') (Line: 475)
Drupal\weather\Service\ParserService->downloadWeather('geonames_3045190', 1678523825) (Line: 438)
Drupal\weather\Service\ParserService->getWeather('geonames_3045190', 0, 1) (Line: 128)
Drupal\weather\Service\ThemeService->preprocessWeatherVariables(Array, 1) (Line: 81)
template_preprocess_weather_detailed_forecast(Array, 'weather_detailed_forecast', Array)
call_user_func_array('template_preprocess_weather_detailed_forecast', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('weather_detailed_forecast', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Trying to access array offset on value of type null in Drupal\weather\Service\ParserService->parseForecast() (line 190 of modules/contrib/weather-weather/src/Service/ParserService.php).
Drupal\weather\Service\ParserService->parseForecast(Object, 'geonames_3045190') (Line: 140)
Drupal\weather\Service\ParserService->downloadForecast('geonames_3045190') (Line: 475)
Drupal\weather\Service\ParserService->downloadWeather('geonames_3045190', 1678523825) (Line: 438)
Drupal\weather\Service\ParserService->getWeather('geonames_3045190', 0, 1) (Line: 128)
Drupal\weather\Service\ThemeService->preprocessWeatherVariables(Array, 1) (Line: 81)
template_preprocess_weather_detailed_forecast(Array, 'weather_detailed_forecast', Array)
call_user_func_array('template_preprocess_weather_detailed_forecast', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('weather_detailed_forecast', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Trying to get property 'time' of non-object in Drupal\weather\Service\ParserService->parseForecast() (line 215 of modules/contrib/weather-weather/src/Service/ParserService.php).
Drupal\weather\Service\ParserService->parseForecast(Object, 'geonames_3045190') (Line: 140)
Drupal\weather\Service\ParserService->downloadForecast('geonames_3045190') (Line: 475)
Drupal\weather\Service\ParserService->downloadWeather('geonames_3045190', 1678523825) (Line: 438)
Drupal\weather\Service\ParserService->getWeather('geonames_3045190', 0, 1) (Line: 128)
Drupal\weather\Service\ThemeService->preprocessWeatherVariables(Array, 1) (Line: 81)
template_preprocess_weather_detailed_forecast(Array, 'weather_detailed_forecast', Array)
call_user_func_array('template_preprocess_weather_detailed_forecast', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('weather_detailed_forecast', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Warning: Invalid argument supplied for foreach() in Drupal\weather\Service\ParserService->parseForecast() (line 215 of modules/contrib/weather-weather/src/Service/ParserService.php).
Drupal\weather\Service\ParserService->parseForecast(Object, 'geonames_3045190') (Line: 140)
Drupal\weather\Service\ParserService->downloadForecast('geonames_3045190') (Line: 475)
Drupal\weather\Service\ParserService->downloadWeather('geonames_3045190', 1678523825) (Line: 438)
Drupal\weather\Service\ParserService->getWeather('geonames_3045190', 0, 1) (Line: 128)
Drupal\weather\Service\ThemeService->preprocessWeatherVariables(Array, 1) (Line: 81)
template_preprocess_weather_detailed_forecast(Array, 'weather_detailed_forecast', Array)
call_user_func_array('template_preprocess_weather_detailed_forecast', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('weather_detailed_forecast', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)