Finding out version, and updating to latest stable of Drupal

by Andrew Newby   Last Updated July 05, 2017 10:07 AM

I have inherited a site that uses Drupal, but I've not had any experience with it before. I'm trying to move it over to a server that has PHP 7 on, but I get all kinds of errors:

warning: Declaration of cck_facet::build_root_categories_query(&$query) should be compatible with faceted_search_facet::build_root_categories_query() in /home/user/web/foo.org/public_html/sites/all/modules/cck_facets/cck_facets.inc on line 16. warning: Declaration of author_facet::build_root_categories_query(&$query) should be compatible with faceted_search_facet::build_root_categories_query() in /home/user/web/foo.org/public_html/sites/all/modules/faceted_search/author_facet.module on line 0. warning: Declaration of content_type_facet::build_root_categories_query(&$query) should be compatible with faceted_search_facet::build_root_categories_query() in /home/user/web/foo.org/public_html/sites/all/modules/faceted_search/content_type_facet.module on line 0. warning: Declaration of date_authored_facet::build_root_categories_query(&$query) should be compatible with faceted_search_facet::build_root_categories_query() in /home/user/web/foo.org/public_html/sites/all/modules/faceted_search/date_authored_facet.module on line 0. warning: Declaration of taxonomy_facet::build_root_categories_query(&$query) should be compatible with faceted_search_facet::build_root_categories_query() in /home/user/web/foo.org/public_html/sites/all/modules/faceted_search/taxonomy_facets.module on line 0. warning: Creating default object from empty value in /home/user/web/foo.org/public_html/sites/all/modules/panels/panels.module on line 1093. user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN ('hebergement')) AND (.status = '1') AND (node_data_field_photographie.field_' at line 1 query: SELECT DISTINCT(node.nid), changed FROM node node LEFT JOIN content_field_photographie node_data_field_photographie ON node.vid = node_data_field_photographie.vid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (.type IN ('hebergement')) AND (.status = '1') AND (node_data_field_photographie.field_photographie_fid > 0) AND ((.uid NOT IN ('1','45','42') OR .uid IS NULL)) ) ORDER BY DESC LIMIT 0, 12 in /home/user/web/foo.org/public_html/includes/database.mysqli.inc on line 154. user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN ('promotion')) AND (.status = '1') AND (DATE_FORMAT(STR_TO_DATE(node_data_fie' at line 1 query: SELECT DISTINCT(node.nid), node_data_field_date_de_dbut.field_date_de_dbut_value AS node_data_field_date_de_dbut_field_date_de_dbut_value, node.title AS node_title, node_data_field_date_de_dbut.field_date_de_dbut_value2 AS node_data_field_date_de_dbut_field_date_de_dbut_value2, v9node.nid AS v9node_nid, v9node.title AS v9node_title FROM node node LEFT JOIN content_field_date_de_dbut node_data_field_date_de_dbut ON node.vid = node_data_field_date_de_dbut.vid INNER JOIN nodefamily nodefamily_child ON node.nid = nodefamily_child.child_nid LEFT JOIN node v9node ON nodefamily_child.parent_nid = v9node.nid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (.type IN ('promotion')) AND (.status = '1') AND (DATE_FORMAT(STR_TO_DATE(node_data_field_date_de_dbut.field_date_de_dbut_value2, '%Y-%m-%dT%T'), '%Y-%m-%d') > '2017-06-16') ) ORDER BY node_data_field_date_de_dbut_field_date_de_dbut_value ASC LIMIT 0, 10 in /home/user/web/foo.org/public_html/includes/database.mysqli.inc on line 154. warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/user/web/foo.org/public_html/includes/database.mysqli.inc on line 383. warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/user/web/foo.org/public_html/includes/database.mysqli.inc on line 383. user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '1') AND (.type IN ('bon_plan')) AND (.tid AND '') AND (. > 0) ) ORDER BY DE' at line 1 query: SELECT DISTINCT(node.nid), changed, node.title AS node_title, users.name AS users_name FROM node node LEFT JOIN content_field_photographie node_data_field_photographie ON node.vid = node_data_field_photographie.vid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (.status = '1') AND (.type IN ('bon_plan')) AND (.tid AND '') AND (. > 0) ) ORDER BY DESC LIMIT 0, 20 in /home/user/web/foo.org/public_html/includes/database.mysqli.inc on line 154. user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '1') AND (.type IN ('hebergement')) AND (node_data_field_photographie.field_ph' at line 1 query: SELECT DISTINCT(node.nid), random, node.title AS node_title, location.city AS location_city, location.postal_code AS location_postal_code FROM node node LEFT JOIN content_field_photographie node_data_field_photographie ON node.vid = node_data_field_photographie.vid LEFT JOIN userpoints userpoints ON node.uid = userpoints.uid LEFT JOIN location_instance location_instance_node ON node.vid = location_instance_node.vid LEFT JOIN location location ON location_instance_node.lid = location.lid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (.status = '1') AND (.type IN ('hebergement')) AND (node_data_field_photographie.field_photographie_fid > 0) AND (userpoints.points > '40') ) ORDER BY ASC LIMIT 0, 1 in /home/user/web/foo.org/public_html/includes/database.mysqli.inc on line 154. user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '1') AND (.type IN ('hebergement')) AND (votingapi_cache_vote_percent_average.' at line 1 query: SELECT DISTINCT(node.nid), votingapi_cache_vote_percent_average.value AS votingapi_cache_vote_percent_average_value, votingapi_cache_vote_percent_count.value AS votingapi_cache_vote_percent_count_value, votingapi_vote_vote_percent.value AS votingapi_vote_vote_percent_value, node.title AS node_title FROM node node LEFT JOIN votingapi_cache votingapi_cache_vote_percent_average ON node.nid = votingapi_cache_vote_percent_average.content_id AND votingapi_cache_vote_percent_average.content_type = 'node' AND votingapi_cache_vote_percent_average.value_type = 'percent' AND votingapi_cache_vote_percent_average.tag = 'vote' AND votingapi_cache_vote_percent_average.function = 'average' LEFT JOIN votingapi_cache votingapi_cache_vote_percent_count ON node.nid = votingapi_cache_vote_percent_count.content_id AND votingapi_cache_vote_percent_count.content_type = 'node' AND votingapi_cache_vote_percent_count.value_type = 'percent' AND votingapi_cache_vote_percent_count.tag = 'vote' AND votingapi_cache_vote_percent_count.function = 'count' LEFT JOIN votingapi_vote votingapi_vote_vote_percent ON node.nid = votingapi_vote_vote_percent.content_id AND votingapi_vote_vote_percent.content_type = 'node' AND votingapi_vote_vote_percent.value_type = 'percent' AND votingapi_vote_vote_percent.tag = 'vote' INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (.status = '1') AND (.type IN ('hebergement')) AND (votingapi_cache_vote_percent_average.value > 20) ) ORDER BY votingapi_cache_vote_percent_average_value DESC, votingapi_cache_vote_percent_count_value DESC LIMIT 0, 10 in /home/user/web/foo.org/public_html/includes/database.mysqli.inc on line 154.

I've already done a search and replace of &$ to just $, as I read that this method was depreciated in PHP 5.4 onwards.

perl -p -i -e 's|\&\$|\$|g' `grep  --include \*.inc -rl '&$' .`
perl -p -i -e 's|\&\$|\$|g' `grep  --include \*.module -rl '&$' .`
perl -p -i -e 's|\&\$|\$|g' `grep  --include \*.php -rl '&$' .`

So now I'm trying to figure out how I update all of the modules / apply all the Drupal 7 patches. I'm used to Wordpress, where it just does it all for you. To me, it seems like everything has to be done manually here. Is that correct?

Any ideas / suggestions would be much appreciated - I'm drowing a bit here!

Tags : updating


Answers 1


You can update your site as follows:

  • Via Drush: run drush rf && drush ups to check for updates. To update a module run drush up [module-name] or drush up drupal to update core.

  • Via the interface: visit /admin/modules. Note that this is not recommended. Also core updates cannot be done through the interface. If possible use Drush.

  • Manual: download the new module packages individually from Drupal.org and replace them in your modules folder. Note that this is not recommended, use Drush.

You can check your site's status via /admin/reports/status. A lot of information is deplayed here, including the core version.

More information about installing Drush: http://docs.drush.org/en/master/install/

Gun5m0k3
Gun5m0k3
July 05, 2017 09:19 AM

Related Questions


Check when core was updated

Updated February 16, 2016 16:03 PM