Project

General

Profile

Bug #6523

content object creation: bad translation request for typename in img element alt attribute

Added by Anonymous almost 7 years ago. Updated almost 7 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
-
Start date:
08/08/2013
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal

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

Associated revisions

Revision d02aa278 (diff)
Added by Yannick Warnier almost 7 years ago

Added padding - refs #6523

History

#1

Updated by Jens Vanderheyden almost 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Anonymous
#2

Updated by Anonymous almost 7 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.

#3

Updated by Anonymous almost 7 years ago

  • Target version set to LCMS 4 Beta
#4

Updated by Anonymous almost 7 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

#5

Updated by Anonymous almost 7 years ago

  • Status changed from Assigned to Bug resolved

Also available in: Atom PDF