Whenever I create a cmis view and it is render for the first time, I get this notice in the header area of the page where the block is displayed:
Notice: Trying to get property of non-object in cmis_views_info() (line 550 of C:\wamp\www\alfresco_v02\sites\all\modules\cmis_views\cmis_views.module).
It is possible to duplicate this problem if you clear the Drupal cache. You will see this notice once for each cmis view on the page.
When I look at the cmis_views_module code for the funtion cmis_views_info, I find the line:
$query_result = cache_get('cmis_views_'.$cmisinfo['cmid'], 'cache');
If I am correct, when the cache is empty, $query_result has no data therefore we get the above notice. When we clear the cache, $query_result has no data and we see the error again. I notice there is a “catch” in the function, but it is invoked after the notice is reported on the page. Any ideas as to how I can stop this notice from appearing on the page? I believe the “catch” corrects the error and the cmis views are displayed correctly but the page now has the reported red notice in the header area. Thanks for your help!
Comments
Comment #1
IanNorton commentedThanks - I've looked into the issue - seems there was a stray line that should have been removed when I fixed the cacheing issue at the weekend.
I've tested multiple views with caching on / off, empty and populated cache and it looks like the error has been fixed, I committed the code lost night, so it should now be available for download.
Comment #2
IanNorton commentedThanks - I've looked into the issue - seems there was a stray line that should have been removed when I fixed the cacheing issue at the weekend.
I've tested multiple views with caching on / off, empty and populated cache and it looks like the error has been fixed, I committed the code lost night, so it should now be available for download.
Comment #3
Talon commentedI installed the new code and it seems to be working perfectly. Thanks!