Image upload from custom form

Hello,

The situation is: I have users with photo field (field_user_photo).
I need to create tiny form to upload this photo just with one file field and submit button. After form submit this image should be attached to user field.
At the moment it is done like this:

duplicate key issues when clearing cache

I get a duplicate key error for DrupalCacheInterface-interface when clearing the cache (D7). I pasted the full error message below (generated while using drush, similar when going through the interface). I enabled caching only a couple of days ago, and applied a patch for cache (1015946-10.patch). Everything seemed fine afterwards. I reversed the patch, still get the error message.

Just before this occurred, I tried to enable the querypath module, which failed and gave me this error message. However, I don't know whether querypath has anything to do with it or just triggered the error message, since it also occurs now when just clearing cache. Additionally (this is a multisite installation) and I get the same error message with the other domains, that don't have cache activated, and don't have querypath enabled.

What I find peculiar is, that after I deleted the offending row from the database table manually, just to see what happens, I still got the error message, but the system has not recreated the row (I reinserted it afterward).

Any help much appreciated.

Thanks, Ursula

WD php: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'DrupalCacheInterface-interface' for key 'PRIMARY': INSERT INTO [error]

Cannot modify header information - headers already sent

I have started getting error "Cannot modify header information - headers already sent" on my website after I upgraded from Drupal 6 to 7

Based on error message, I did some digging and found that the error originates in function drupal_page_footer() in file public_html/includes/common.inc line 2561

As per search on the Drupal site, I have verified that the .inc files do not have closing brackets.
I also verified that the files were unpacked in ASCII format.

Managing Field Displays

I have a bunch of custom fields on my content type. One of those fields's data is auto populated by Rules module upon creation and/or edition.

I want to display that field on node displays, however I want to hide that field during content create or edit because...
a) whatever the author fills in that field will be overwritten by rules module.
b) Seeing that field will confuse authors.

Im sure there are many different ways to achieve this goal but Im wondering what would be the best, most convenient approach to do this.

Any idea?

Thanks...

How to create category ?

How to create category ?

example menu is "art", under have sub menu "painting", "craft", "gift" ?

how to create sub menu/category like "painting", "craft", "gift" ?

View by Taxonomy Term - hide empty term

View by Taxonomy Term - hide empty term

I've searched through through all the posts that may be slightly relevant and tried everything that looks right in constructing the view, but cannot get this to work.

I've constructed a View using the Term view type that pulls out all the terms in a certain vocabulary and displays them in a nice grid (with an attached image in a CCK field for the term).

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x