View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000931 | OXID eShop (all versions) | 1.01. Products (product, categories, manufacturer, promotions etc.) | public | 2009-05-25 14:53 | 2012-12-07 14:29 |
Reporter | joshua | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 4.0.1.0 revision 15990 | ||||
Summary | 0000931: HTML-Tags in product title are not displayed correctly | ||||
Description | If you have some HTML tags in your product title, e.g. using markup like <sup>©</sup> the title will be encoded and the result in shop frontend looks like this: <sup>©</sup> As a workaround, using the "rawValue" field of an object instead of the "value" field will solve that problem, so the output of the product title on details page should look like this: $product->oxarticles__oxtitle->rawValue But in some cases, there is more to do than just changing the template var. For example, if you use product variants and one of the variants on details page is clicked, you see the back-link to parent product. In this case, there are two template vars provided by the backend: "parent_url" and "parentname". Printing out the var "parentname", the same effect as described above applies. Ther only way to change this is to write a short module, which returns the raw value of the product title instead of the normal one. It would be nice, if this will be fixed in one of the futures releases... | ||||
Tags | Products | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
|
Reminder sent to: joshua can not reproduce such behaviour neither on 4.0.1.0 revision 15990 nor on newest version. if I add "<sup>©</sup>" to product title, i see "<sup>©</sup>" in frontend also. (similar problem existed with selection lists titles, but it is already fixed in newer versions). could you provide some more information about special settings/modules, that are in the shop? greetings, Birute M. |
|
What do you mean by saying "i see "<sup>©</sup>" in frontend also"? Do you see it in the source code (then it should render correctly) or is it displayed in the rendered page (then it is encoded as "<sup>©</sup>" in the sourcecode)? |
|
Reminder sent to: joshua I guess there is a misunderstanding: joshua, you want to be able to enter HTML code and special chars in product titles which are then rendered. By now, these input fields are working different: In frontend the value is displayed exactly as entered (if you enter <sup>..., then <sup>... is shown in frontend). So this is more a feature request: That HTML code entered in titles is not displayed but is rendered, e.g. that "Product title ©" is shown as "Product title ©" in frontend, right? |
|
OK, I understand, two things about it: 1) In earlier shop versions (<4) this worked fine - the html tags were rendered correctly. Now, after upgrading the shop from 2.7.0.3 to EE 4, it works different, meaning that all html snippets in product titles are displayed plain and are not rendered in frontend (because the html tags are html encoded in source code) 2) The object $product->oxarticles__oxtitle now has one new property "->rawValue" besides the old one "->value". It seems that this new property "->rawValue" represents the original value from database, the old property now returns the values html encoded. Therefore as a quick fix we replaced all outputs in templates from "->value" to "->rawValue" - but in some cases (as I mentioned earlier), it is not possible to output the "->rawValue" property because there is no such object assigned to templates engine. So, in general, why do you html encode the product titles in the object property "->value"? If you plan to continue with this concept, you should additionally provide methods for retrieving the plain database (raw) value. For example using an extra parameter for a method like: $oView->getProductTitle($raw=true) Waht do you mean? |
|
@Developers: please, check from source code, if this implementation will not harm any functionality (titles are still displayed correctly everywhere, sorting and search by title works correct etc. ). if such changes will not harm shop - implement it. if it will harm, then need to discuss about possible solutions. |
|
Reminder sent to: joshua After some discussion with development team, ti's clear that solution for this issue needs lot of changes in the templates also implementing new methods for proper support of current and raw values. So this case is moved to customers whishlist for further discussion in details and implementation in Major version. Thus - the entry here is closed. Thank you for your report. |