Tuesday, 25 December 2012

Happy winter!

The new Commerce Kickstart installation is OK with a few error messages "right out of the box" as they say on the videos, and seems to work very slowly. Ignoring the error messages, I know from using Drupal Core that there is a heading in the menus called performance for things like cache to turn-on and make it fast. How to turn them on in Kickstart?

  • Core Drupal 7: I can speed-up the program by turning-on the cache (but I can't follow instructions for adding a product which is tricky, so I'm not using this dashboard for my shop). In Core Drupal, I try menu options until Configuration: my speeding-up options are in a box there marked Performance. Once there, the path reads:

    Home » Administration » Configuration » Development 
  • Commerce Kickstart 7.2: I can begin to follow instructions for adding a product, but I can't speed-up the program by finding the cache setting and turning it on. Moreover, the jargon has changed. Core Drupal had nodes and now has content. Commerce Kickstart has - something I still need to get my head around, which uses other terms.

    Found the answer! There are two settings menus and the second hides a lot of tekkie stuff away somewhere where I thought I'd looked, but had missed it. It's easy to miss something called Development when you know you're not a great developer. Trying the Kickstart web site it turns-out that I have asked this question before and got an answer, suggesting that cache still does exist so I had another look.

I was going to post a great picture of a man in Pants to Poverty undies standing next to a decorated cow, but their Shopify site is down today.

Update: Pants to Poverty have a picture of a dressed-up cow back online today, and I have disabled the overlay module which helps according to guides like http://friendlymachine.net/posts/2011/5-ways-to-improve-performance-in-drupal

Update: Pants to Poverty are now on http://pantstopoverty.org.uk

Oh. That page doesn't mention disabling the Overlay module [done] and replacing Toolbar with Admin Menu as other googlable pages do. Do I loose the toolbar if I disable the Toolbar Menu? Probably. One thing I did notice is that the module list is most easily searched from the top left index to modules called "All". I used this to disable the Jiraffe module, which eats money.

A note for later is that the Boost module works on cheap shared hosting where Memcached doesn't.

https://www.youtube.com/watch?v=aJcJbKaCZJs is a Lynda.com video that shows pictures of the sites that speed-y-up modules come from, but doesn't say much about which work with which.

Sunday, 23 December 2012

Fatal error: Call to undefined function field_attach_load() in C:\commerce_kickstart-7.x-2.0\includes\entity.inc on line 321

There is a new Commerce Kickstart.
Installing it is slow but possible. An option is not to use the special shopkeepers' toolbar. I chose not to, because I have been trying some of the videos on http://nodeone.se/sv/learn-drupal and wanted to use the same default tooblar, but without it I didn't manage to follow the product-adding instructions.

  • With hindsight, I could have googled "Toolbar_magicmenu" and installed the .gz file by clicking "modules" on the admin menu and using the box where you can paste-in the url of a module to install before pressing "install", and probably something after like "enable". Next, "Commerce_Kickstartmenu".
  • With a reset option to go back to the default install, I can try to do just that, using a confirmation button which says "Kill Me!", as you do.

Having killed my product-less site, I try again:

Fatal error: Call to undefined function field_attach_load() in C:\commerce_kickstart-7.x-2.0\includes\entity.inc on line 321

Two or three attempts to use control+backarrow, retype second password and click return all fail.

Attempt: I cut the question mark and everything after it from the url and pressed return. This takes me back one stage further in the installation process to a page beginning "


Thank you for choosing Commerce Kickstart!

I click the "get started" button and fill-in the usual name for the test site. Result? (from memory)
Fatal error: Call to undefined function field_attach_load() in C:\commerce_kickstart-7.x-2.0\includes\entity.inc on line 321


On googling the error message I find that Commerce Guys have been producing this syrup-voiced set of videos as though Drupal worked, while some 57 different people in one thread alone out of two or three. Solutions are often highly technical and require knowledge of databases and php files. I am using the most basic installation on an Aquia stack, using a Windows XP computer but it seems that software vendors are unaware of the problem and just use glib meaningless phrases like "right out of the box" instead of addressing problems.

One of the solutions posted was to "clear the database cache". I am using Aquia Drupal Stack Installer as suggested in the Tom Geller Youtube video. There is a button for databases. I found one table in this base for cache and deleted the contents. Some success: I now have a basic drupal default logon screen, but no username and password. Another table in the base - the last on the list I think - had "placeholder" for user 1 and password, so I added that and an email and tried again. Is this the start of a revived Commerce Kickstart? No.

Fatal error: Call to undefined function field_attach_load() in C:\commerce_kickstart-7.x-2.0\includes\entity.inc on line 321

I can find the file on my hard disc and have a look. Line 321 is the third last of this paragraph:

  protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
    // Attach fields.
    if ($this->entityInfo['fieldable']) {
      if ($revision_id) {
        field_attach_load_revision($this->entityType, $queried_entities);
      else {
        field_attach_load($this->entityType, $queried_entities);

Using Notepad++ as a handy bit of free editing software I try turning "FALSE" into "TRUE" in the file above. No difference in outcomes. I try deleting contents of the cache again. Same again. This is a bit like trying to fly without any wings and I have no idea what I am doing

here are some Ubercart instuctions. Ubercart hopes to be a shortcut to writing ecommerce sites using Drupal.
Transcribed videos: -
[Drupal 7 / Ubercart video tutorial 7 of 10 showed how to use the default catalog module]
[Drupal 7 / Ubercart video tutorial 8 of 10 showed an alternative flexible method of showing a catalog]
[Drupal 7 / Ubercart video tutorial 9 of 10 shows how to use product kits, stock, and order states]
[Drupal 7 / Ubercart video tutorial 10 of 10 shows a simple checkout, reports, and suggests a theme