Skip to content

Instantly share code, notes, and snippets.

@TheEYL
Created February 23, 2015 18:18
Show Gist options
  • Save TheEYL/6a439b8a4f867477292d to your computer and use it in GitHub Desktop.
Save TheEYL/6a439b8a4f867477292d to your computer and use it in GitHub Desktop.
Druapal commerce kickstart setup on ubuntu
//////////////////////////////////////////////////////////////////////////
/ SETTING UP DRUPAL COMMERECE KICKSTART ON UBUNTU 12.04 /
/ by EYOG YVON LEONCE /
//////////////////////////////////////////////////////////////////////////
1. Download and Install Xammp.
2. In the htdocs folder, place your copy of Commerce kickstart that you downloaded and uncompressed.
3. Create the folder files in the kickstart folder
$ mkdir sites/default/files
4. Give the required permisions to the apache server over this folder
$sudo chown -R www-data sites/default/files
5. Copy the default.settings.php. I said copy.
$ cp sites/default/default.settings.php sites/default/settings.php
6. Change the permisions
$ chmod a+w sites/default/settings.php
or
$ chmod 644 sites/default/settings.php
7. Render the sites/default/files writable
$ sudo chmod -R a+w sites/default/files
8. You'd logging as administrator then get an "access denied" message, open a private browsing session and all will be well otherwise clear your cookies.
//POStGrES SPECIFIC
9. You'd get this error when trying to see modules "PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer"
apply the patch below in the includes folder ( patch < .../includes/1932612_5_non_numeric_entity_ids.patch
)
diff --git a/includes/entity.inc b/includes/entity.inc
index 2fefd59..e465b0b 100644
--- a/includes/entity.inc
+++ b/includes/entity.inc
@@ -158,6 +158,10 @@ class DrupalDefaultEntityController implements DrupalEntityControllerInterface {
* Implements DrupalEntityControllerInterface::load().
*/
public function load($ids = array(), $conditions = array()) {
+ if (is_array($ids)) {
+ // Remvoe all non numeric ids.
+ $ids = array_filter($ids, 'is_numeric');
+ }
$entities = array();
// Revisions are not statically cached, and require a different query to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment