I got a DatabaseSchemaObjectExistsException while installing a module and the error message had the em tags htmlencoded.

DatabaseSchemaObjectExistsException: Table <em class="placeholder">cache_coder</em> already exists. in DatabaseSchema->createTable() (line 544 of /var/www/drupal7/includes/database/schema.inc).

The actual error was reported in the corresponding module (#780296: Error cache_coder already exists in DatabaseSchema on installation). However, shouldn't the em tags not have been html encoded?

Comments

Crell’s picture

Priority: Minor » Normal

hm. That's because we used % instead of @ as the placeholder type there. Oopsies.

Crell’s picture

Status: Active » Needs review
StatusFileSize
new19.19 KB

A simple but tedious patch.

Status: Needs review » Needs work

The last submitted patch, at-no-percent.patch, failed testing.

Crell’s picture

Status: Needs work » Needs review

Oh for the love of pete... It applies just fine for me, you stupid bot.

Crell’s picture

#2: at-no-percent.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, at-no-percent.patch, failed testing.

naxoc’s picture

Version: 7.0-alpha3 » 8.x-dev
Status: Needs work » Needs review
StatusFileSize
new22.33 KB

Came across this today. Still here. Reroll for D8.

Crell’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs backport to D7

We probably want to remove those t() calls anyway, but at least for now this is a bugfix.

Marking for backport, too. Thanks, naxoc!

webchick’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

I confess I did not review all of these in-depth. :P But scanned it and it seems to be just the same % to @ change over and over and over. Well. Except for that dirty limerick that naxoc added to settings.php (I kid :)).

Committed and pushed to 8.x. Thanks!

Moving back to 7.x.

dcam’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new22.93 KB

Backported #7 to D7.

mgifford’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

So the changeover "% to @ change over" is just getting the format_string right.

It's in D8. It applies nicely at D7 (and it installs easily). I can't see any problem with marking this RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 780304-10-schema-errors.patch, failed testing.

Status: Needs work » Needs review
dcam’s picture

Status: Needs review » Reviewed & tested by the community

Yet another random failure.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 780304-10-schema-errors.patch, failed testing.

Status: Needs work » Needs review
dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 780304-10-schema-errors.patch, failed testing.

Status: Needs work » Needs review
dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 780304-10-schema-errors.patch, failed testing.

Status: Needs work » Needs review
dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 780304-10-schema-errors.patch, failed testing.

Status: Needs work » Needs review
dcam’s picture

Status: Needs review » Reviewed & tested by the community
David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x - thanks!

So technically this does break lots of translations, but I can't imagine any of them show up in a situation where it really matters.

Note there was one broken one in the patch, which I fixed on commit (was not present in Drupal 8) via this interdiff:

--- a/includes/database/pgsql/schema.inc
+++ b/includes/database/pgsql/schema.inc
@@ -317,7 +317,7 @@ class DatabaseSchema_pgsql extends DatabaseSchema {
       throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot rename @table to @table_new: table @table doesn't exist.", array('@table' => $table, '@table_new' => $new_name)));
     }
     if ($this->tableExists($new_name)) {
-      throw new DatabaseSchemaObjectExistsException(t("Cannot rename %table to @table_new: table @table_new already exists.", array('@table' => $table, '@table_new' => $new_name)));
+      throw new DatabaseSchemaObjectExistsException(t("Cannot rename @table to @table_new: table @table_new already exists.", array('@table' => $table, '@table_new' => $new_name)));
     }
 
     // Get the schema and tablename for the old table.

  • David_Rothstein committed 90687ab on 7.x
    Issue #780304 by dcam, naxoc, Crell | zyxware: Fixed HTML encoding of em...

Status: Fixed » Closed (fixed)

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