Bug #6523
closed
content object creation: bad translation request for typename in img element alt attribute
0%
Description
When publishing a content object, the <img> (icon) alt attribute gets the typename of a content object. For example, a document type should become:
<img alt="Document" src="...resource/images/[theme]/logo/16.png" />
however, the Translation :: get ('TypeName') gets a wrong context: repository\content_object\repository\content_object\document\Document isntead of just repository\content_object\repository\content_object\document
Files
Updated by Jens Vanderheyden over 9 years ago
- Status changed from New to Assigned
- Assignee set to Anonymous
Updated by Anonymous over 9 years ago
in repository/php/lib/content_object.class.php: line 1587, function get_content_object_type_namespace causes
the type to be prepended with 'repository\content_object\\', this prefix is already present in the type. However, I am not sure if this is a general issue, or only with some types.
Updated by Anonymous over 9 years ago
resolved (finally!)
in /repository/php/lib/content_object.class.php, method get_content_object_type_namespace:
dirty fix, but easier than finding and removing all doubles.
$prefix = 'repository\content_object\\'; if (strpos($type, $prefix) === 0) return $type; else return $prefix . $type;
in file application/weblcms/php/lib/publisher/content_object_publisher.class.php, wrap call to above method in Utilities :: get_namespace_from_classname.
in repository/content_object/document/php/lib/data_class/content_object.class.php, method get_icon_path, wrap call to above function in Utilities :: get_namespace_from_classname
Updated by Anonymous over 9 years ago
- Status changed from Assigned to Bug resolved