Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After upgrading to 7.x-1.12 got a few warnings on one of my sites:
Warning: file_exists(): open_basedir restriction in effect. File(../block/icon_core_booknavigation.png) is not within the allowed path(s): (//customers/f/b/0/stoops.es//httpd.www://customers/f/b/0/stoops.es//httpd.private://customers/f/b/0/stoops.es//tmp:/customers/stoops.es/stoops.es:/var/www/diagnostics:/usr/share/php) in ctools_content_admin_icon() (regel 419 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/content.inc).
Comment | File | Size | Author |
---|---|---|---|
#10 | ctools-wrong-book-icons-path-2829691-10.patch | 1.48 KB | bessone |
Comments
Comment #2
luk.stoops CreditAttribution: luk.stoops as a volunteer commentedComment #3
rivimeyHi, thanks for the report. Looking at the other plugins, the pattern is to not include any path in the icon filename.
Could you confirm if editing node_book_nav.inc like this works (i.e. there's still an icon in the admin pages) and makes the error go away?
[Please note - this is not intended as a final patch, just as a test]
Comment #4
donaldp CreditAttribution: donaldp commentedI've also had similar warnings. Although the book modules was installed on this particular site, there was no content actually using it. So I fixed the warnings by disabling the book module.
Not sure if it's relevant to your change but before I disabled the module I did try your code above but got.
Undefined index: module in ctools_plugin_get_directories() (line 527 of /var/www/vhosts/readyweb-servers.co.uk/drupal.7/html/sites/all/modules/ctools/includes/plugins.inc).
Undefined index: type in ctools_plugin_get_directories() (line 527 of /var/www/vhosts/readyweb-servers.co.uk/drupal.7/html/sites/all/modules/ctools/includes/plugins.inc).
Undefined index: block in include_once() (line 9 of /var/www/vhosts/readyweb-servers.co.uk/drupal.7/html/sites/all/modules/ctools/plugins/content_types/node_context/node_book_nav.inc).
If it would be any help I could try something else as I think my matching dev server version should be able to duplicate this.
Comment #5
luk.stoops CreditAttribution: luk.stoops as a volunteer commentedHi,
I tried the suggested modifications on node_book_nav.inc
This is what I get now after the database update:
Notice: Undefined index: module in ctools_plugin_get_directories() (regel 527 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/plugins.inc).
Notice: Undefined index: type in ctools_plugin_get_directories() (regel 527 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/plugins.inc).
Notice: Undefined index: module in ctools_plugin_get_directories() (regel 527 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/plugins.inc).
Notice: Undefined index: type in ctools_plugin_get_directories() (regel 527 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/plugins.inc).
Notice: Undefined index: module in ctools_plugin_get_directories() (regel 527 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/plugins.inc).
Notice: Undefined index: type in ctools_plugin_get_directories() (regel 527 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/plugins.inc).
Notice: Undefined index: block in include_once() (regel 11 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/plugins/content_types/node_context/node_book_nav.inc).
Warning: file_exists(): open_basedir restriction in effect. File(../block/icon_core_block_menu.png) is not within the allowed path(s): (//customers/f/b/0/stoops.es//httpd.www://customers/f/b/0/stoops.es//httpd.private://customers/f/b/0/stoops.es//tmp:/customers/stoops.es/stoops.es:/var/www/diagnostics:/usr/share/php) in ctools_content_admin_icon() (regel 419 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/content.inc).
Comment #6
luk.stoops CreditAttribution: luk.stoops as a volunteer commentedJust to be complete, these are the messages i get after restoring the original node_book_nav.inc
Warning: file_exists(): open_basedir restriction in effect. File(../block/icon_core_booknavigation.png) is not within the allowed path(s): (//customers/f/b/0/stoops.es//httpd.www://customers/f/b/0/stoops.es//httpd.private://customers/f/b/0/stoops.es//tmp:/customers/stoops.es/stoops.es:/var/www/diagnostics:/usr/share/php) in ctools_content_admin_icon() (regel 419 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/content.inc).
Warning: file_exists(): open_basedir restriction in effect. File(../block/icon_core_block_menu.png) is not within the allowed path(s): (//customers/f/b/0/stoops.es//httpd.www://customers/f/b/0/stoops.es//httpd.private://customers/f/b/0/stoops.es//tmp:/customers/stoops.es/stoops.es:/var/www/diagnostics:/usr/share/php) in ctools_content_admin_icon() (regel 419 van /customers/f/b/0/stoops.es/httpd.www/sites/all/modules/ctools/includes/content.inc).
Comment #7
bessone CreditAttribution: bessone commentedSame problem to me, with book module enabled.
This is my quick and dirty fix:
Comment #8
bessone CreditAttribution: bessone commentedsame problem for another file
Warning: file_exists(): open_basedir restriction in effect. File(../block/icon_core_block_menu.png) is not within the allowed path(s): (/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/private:/var/www/clients/client1/web1/tmp:/var/www/xxx.com/web:/srv/www/xxx.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in ctools_content_admin_icon() (linea 419 di /var/www/clients/client1/web1/web/sites/all/modules/ctools/includes/content.inc).
dirty fix:
Comment #9
rivimeyWould the best solution be to copy or move the book navigation icons into the correct plugin folder so they can be accessed locally?
Comment #10
bessone CreditAttribution: bessone at 3ding Consulting commentedFor convenience I did the patch either modifice code in the comments #7 and #8.
Changing status to "Needs review"
Comment #11
darrenwh CreditAttribution: darrenwh as a volunteer and at Investis Digital commentedCode checks out RTBC
Comment #12
rivimeyComment #13
rivimeyComment #15
japerryPretty straightforward. Fixed!