The theme API defines the hook_process() which passes an array to those functions implementing that hook. Now, the problem is that transliteration_process() is perceived to implement that hook and throws a warning because it expects the first parameter to be a string.

This doesn't always happen because the function transliteration_process() is defined in transliteration.inc and therefore is only known when some cirecumstances make that file to be included.

I think the only resolution is to rename that function to something that doesn't implement a hook.

Comments

smk-ka’s picture

Status: Active » Needs review
StatusFileSize
new1.64 KB

I see, Drupal 7 really names its hooks accurately... another WTF on a growing list.

Anyway, here's my proposed solution: turn transliteration_process() into a private function, you shouldn't ever need to call it directly, since that's what transliteration_get() is meant for. Also simplified the load condition slightly, no need to statically cache something that's known otherwise.

jurgenhaas’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

smk-ka’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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

pfrenssen’s picture

Status: Fixed » Needs work

This bug has resurfaced in commit baf339232de23d5895dd4a76599a3da45e061036 "Synced HEAD with DRUPAL-6--2".

The function name has been reverted to transliteration_process().

pfrenssen’s picture

Status: Closed (fixed) » Needs work
StatusFileSize
new1.21 KB

Another regression occurred in commit b72f33afbaefb18edb6a84b19798b2e9148e9782 "by smk-ka: Added admin UI for settings and retroactive file name transliteration."

The optimalisation concerning the static variable you proposed in comment #1 has been removed in this commit. Possibly there are other regressions introduced by porting features from the D6 version.

Here is a patch that fixes these two regressions in the current 7.x-3.0-alpha1 version.

pfrenssen’s picture

Status: Needs work » Needs review
stijndm’s picture

Patch seems to work fine.

pfrenssen’s picture

Status: Needs review » Fixed

I was mistaken, the latest 7.x-3.x-dev does not have this bug in it.

Status: Needs work » Closed (fixed)

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

juampynr’s picture

When will it be in a stable release?