EntityMalformedException, missing bundle property for field_collection field in combination with apachesolr_attachments

Sometimes field_collection really is not the reason why the world sucks. 

Sometimes OTHER contrib modules are pretty stupid and make assumptions like “Any entity must be a node, right?” DUH!

This time apachesolr_attachments was the culprit.

If a file gets updated, apachesolr_attachments also wants to update the solr index for the parent entity to which the file is attached.

And look how apachesolr_attachments goes about retrieving the entity info of the parent:

 

Disk size full (and you're running mysql)?

Is your disk running full, and you know you're running MySQL, you might want to check if you have general log enabled. If this is the case your log can grow incredibly in size.

On my system (Open Suse) it was located in /var/lib/mysql/linux-pxi1.log.

You can find out if you have general log enabled and what the log file is with the mysql system variables.

F.i. after logging into MySQL client (command line)

mysql> show variables like 'general_log%'\G;

*************************** 1. row ***************************

Variable_name: general_log

Install XHPROF on Open Suse (12.2 x86_64)

Xhprof

Profiling, especially for performance reasons.

Install xhprof

Install XHPROF on Open Suse (12.2 x86_64)

Xhprof

Profiling, especially for performance reasons.

Install xhprof

  • sudo cd /opt
  • sudo wget http://pecl.php.net/get/xhprof-0.9.2.tgz
  • sudo tar -xvzf xhprof-0.9.2.tgz
  • sudo cd ./xhprof-0.9.2/extension/
  • (You may need to install gcc and autoconf: zypper in autoconf and zypper in gcc)
  • sudo phpize
  • sudo ./configure --with-php-config=/usr/bin/php-config
  • sudo make
  • sudo make install

Tell php about this extension

Tags:

How to allow a webform component description to be rendered before or after component?

  • Implement hook_form_alter() to add a select field such as  $form['display']['description_display']. 
  • You can copy $form['display']['title_display'] and modify it to your needs. 
  • You'll need to grab the existing value of your field from the $form_state:

$cid = $form['cid']['#value']; 

if (isset($cid) &&

    isset($form_state['build_info']['args'][0]) &&

    is_object($form_state['build_info']['args'][0]) &&

How to install Drupal 7 on one.com shared hosting

One.com has some Apache2 directives in their server configuration, which screws up uploading to your files directory as it contains .htaccess files with Directives one.com will not allow there.

The solution is to comment following directives in your files and temporary files directory. (To be able to do this last thing, I needed to put the temporary files directory on a location one.com allows me to reach. I've put int in sites/default/files)

#Options None

#Options +FollowSymLinks

 

Why is my persistent variable missing in update.php?

Ever used a variable_get() in an update function in your module's install file and not received the expected result?

Did you notice your variable is at hand in a regular request but not in an install function or update function.

Now, do you happen to use features and strongarm? Might it be that this particular variable is not kept in variables table but in code, using strongarm? Yep, that's it.

How to install a PECL extension for PHP 5.2 in Zend Server

I'm currently developing a Drupal site on Mac OS X 10.6 using the Zend Server. This comes with quite some PECL extensions pre-installed.I did need another extension for this site : Radius.Luckily, Zend server comes with the pecl command installed.

D6: How to notify users if a referenced node is updated?

If you want notifications sent for those nodes who reference certain other nodes (using cck nodereference fields), read this...

 

A custom subscription type is needed to create notification events for referenced nodes. 

Use hook_notifications with operation 'subscription types'. Look to notifications_content.module for an example.

 

There is no native notifications way to store an event based on a value of a cck field in a node.

 

How to translate Views filters default <Any> label in D6?

Views exposed filter label is not translatable in D6.Go to Administer > Site building > Views and select tab tools.Replace 'Label for "Any" value on optional single-select exposed filters: ' by the translatable '- Any -'.Important: visit the views with exposed filters in at least one language which isn't your default language.Then you can translate "- Any -" through Aminister > Site building > Translate interface (case sensitive).

Pages

Subscribe to Drupal drips RSS