Currently the theme hook "twitter_status" declared by this module uses a template file named "tweet.tpl.php". Since this template file is not named the same as the theme hook, it cannot be overridden it by copying the template into your theme. Instead, you must copy and rename it to "twitter_status.tpl.php". This is unintuitive and a non-standard practice.

Comments

kerasai’s picture

Status: Active » Needs review
StatusFileSize
new3.01 KB

Patch attached with file renamed, and hook_theme() implementation adjusted to suit.

hussainweb’s picture

Version: 7.x-5.x-dev » 7.x-6.x-dev
Issue summary: View changes
StatusFileSize
new3.4 KB

To elaborate, the root bug is discussed in #342350: Override template files based on template filename as well as hook name and it doesn't look like it would be fixed for Drupal 7 (it is fixed for Drupal 8).

I am attaching a patch with the workaround for 7.x-6.x branch and I would say this is a major bug.

m.abdulqader’s picture

copy your tweet.tpl.php to your theme and rename it to twitter_status.tpl.php that will work without this patch :)

damienmckenna’s picture

Status: Needs review » Needs work

Triggering the testbot.

damienmckenna’s picture

Status: Needs work » Needs review

Triggering the testbot.

Status: Needs review » Needs work

The last submitted patch, 2: twitter-tweet-tpl-1974102-2.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new921 bytes

Rerolled.

damienmckenna’s picture

Version: 7.x-6.x-dev » 7.x-5.x-dev
StatusFileSize
new921 bytes

Ported to 7.x-5.x.

The last submitted patch, 9: twitter-n1974102-9-7.x-6.x.patch, failed testing.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 72e7059 on 7.x-5.x authored by kerasai
    Issue #1974102 by kerasai, hussainweb, DamienMcKenna: Rename tweet.tpl....

  • DamienMcKenna committed 6eb6e8c on 7.x-6.x authored by kerasai
    Issue #1974102 by kerasai, hussainweb, DamienMcKenna: Rename tweet.tpl....

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.