Mikey P
  • Member for 10 years, 10 months
  • Last seen more than 2 years ago
What's the proper way to use EntityFieldQuery?
Accepted answer
36 votes

EntityFieldQuery uses a set of hooks to interface with field storage modules, such as Field SQL Storage, in order to work for fields as well as other node properties. Long term, EntityFieldQuery is a ...

View answer
Can I turn cache off for the development deployment?
9 votes

If you are using Drupal 7 you can always set your caching to using DrupalFakeCache, which is normally only used during the installation process. To set that, drop the following code snippet in your ...

View answer
Database administration site on Drupal: entities vs. manual programming
Accepted answer
4 votes

While I can't see any significant benefits to doing this with Drupal, I think this should generally work. I've converted old systems that were using db_query and custom code to Drupal 7 Entities with ...

View answer
What is the recommend process for migrating a Drupal 6 Ubercart site to Drupal 7 / Drupal Commerce?
4 votes

I don't think there is an easy no munging method to get to Drupal Commerce. Over time, someone will hopefully publish some MigrationDestination and MigrationSources that correspond with Commerce ...

View answer
Drupal 7 html.tpl.php vs page.tpl.php variables questions/thoughts
3 votes

Something to keep in mind is that Drupal doesn't work with templates the way a traditional MVC framework will. Ideally you want to have as few templates as possible in your theme, i.e having only one ...

View answer
Order in entity_load
Accepted answer
2 votes

Most entity controller implementations of ::load() will return entities in the same order as the array of IDs passed in to be loaded. This is the case with DrupalDefaultEntityController and ...

View answer
Fieldable entity issue
Accepted answer
2 votes

You'll need to provide a menu item and page that lists information about your entity type (typically settings). If you provide multiple bundles you'll need to provide a page for each bundle. After ...

View answer
Would cache in files be an alternative?
2 votes

While the Boost module accomplishes the same method, there are many alternatives that may perform even better, such as the Drupal page cache (which caches the whole page into a single database record),...

View answer
Getting the number of Flood events within threshold?
1 votes

The only way to do that with the default FloodInterface would be to use the isAllowed method and adjust the threshold to the number of allowed attempts. From a hook_form_alter() you could do ...

View answer
Entity Reference auto complete user name with different field
Accepted answer
1 votes

You can either use the solution mentioned by Clive in the comment above, or build your own CTools plugin for entityreference_selection. That may take some trial and error but could give you even ...

View answer
Creating smaller menus from chunks of a bigger menu
Accepted answer
1 votes

What you are describing is the primary feature provided by the Menu block module.

View answer
How to refresh entity from entity_load(), reloading the entity as it is now?
1 votes

The short answer is that it depends on the entity in question, as it's up to the controller how to handle the resetCache() method call (if it overrides the default implementation provided in ...

View answer
How to code custom entity to access more than one database table?
0 votes

Entity API itself can only interact with one base table for joining to fields, querying with EntityFieldQuery, loading/saving revisions, etc, but you can use more than one table for storage if you ...

View answer
Pseudo-fields and custom entity properties from additional schema
0 votes

You may have to override the form submit handler, or at a minimum add you're own submit handler in addition to the default. As long as the submit handler starts with an entity passed through the $...

View answer
Custom fields added via form api not working as expected
0 votes

It's not very clear what you are doing with the $output variable since the return value from hook_form_alter() isn't used anyway. zerolab is correct that you should not be using drupal_render, you're ...

View answer
Remove Classes from Menu
Accepted answer
0 votes

Basically you're going to have to alter you're theme to provide an alternate function to provide an entry point into menu_tree_output. This means finding the block or function that renders the menu, ...

View answer