If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / [Done v1.5.0] Is it the editor, ZC or browsers?

[Done v1.5.0] Is it the editor, ZC or browsers?

Started by athens_collectibles on 26 Jul 2011, 3:37 PM · Views: 1,337

Results 1 to 17 of 17
26 Jul 2011, 3:37 PM
#1
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #1 by athens_collectibles

I normally prepare my page contents and product descriptions with the help of FrontPage or Notepad++ and insert the HTML code in Zen Cart after changing the FrontPage's nasty <br> to <br />, all & characters to & and all instances of € to € in order for the code to pass the W3C validator.

I have tried both the Plain Text and the HTMLarea editors (the latter in code mode) and that works fine until the page is saved. If I re-open the page in the editor, all & have been converted to &, all € to € and so on. This means that, even if I want to change a single character, I have to copy the code, paste it in Notepad++, do what change is required and then Find & Replace all special characters again.

I have tried with the latest versions of Google Chrome and Firefox but there's no difference between the two.

Any ideas why this is happening and if, installing another editor (suggestions welcome), would change things?

26 Jul 2011, 4:59 PM
#2
meshgraphics avatar

meshgraphics

New Zenner

Join Date:
Mar 2008
Location:
Ontario
Posts:
42
Plugin Contributions:
0

Post #2 by meshgraphics

It is complicated and hard to keep straight. You may have noticed these encoding errors can be seen all over the net.

The cut and paste facility of the os (operating system) converts the text on the Cut and Paste.

The short answer:

You want to type € and paste €

If your editor has a preview, you can view it there.

Jonny
http://meshgraphics.com Where shapes become different shapes than the shapes they had been previously. Me do good ad copy 2

26 Jul 2011, 5:16 PM
#3
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #3 by athens_collectibles

Hi Jonny and thanks for your reply.

I may have not described the issue correctly: I do use € instead of € and & instead of & when preparing the text in my editor, I copy and paste the HTML code in the Define Pages Editor and it is accepted correctly with the special characters rendered correctly in the browsers and the page validating with W3C.

The problem is when I re-open the editor and all the above coding is gone and replaced with € and &. If I save at that point (changes made or not), the page obviously doesn't validate because of the € and & characters.

26 Jul 2011, 7:01 PM
#4
meshgraphics avatar

meshgraphics

New Zenner

Join Date:
Mar 2008
Location:
Ontario
Posts:
42
Plugin Contributions:
0

Post #4 by meshgraphics

Are you talking about editing a product description in the Admin?

Jonny
http://meshgraphics.com Where shapes become different shapes than the shapes they had been previously. Me do good ad copy 2

26 Jul 2011, 7:30 PM
#5
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #5 by athens_collectibles

I'm talking of both the product description and define pages editors. To take a fictitious entry:

Enter the following in the editor and save:

This product costs [B]€[/B]1,000 and you can see it at
http://www.athenscollectibles.info/index.php?main_page=product_info[B]&[/B]cPath=5_27[B]&[/B]products_id=1

This will render in the browsers as:

This product costs [B]€[/B]1,000 and you can see it at
http://www.athenscollectibles.info/index.php?main_page=product_info[B]&[/B]cPath=5_27[B]&[/B]products_id=1

Run through the W3C validator. The page validates!

Go back and open the page in the editor. The previously entered first code (with € and &) is now changed to € and &. If you save at this point, the page doesn't validate because the editor has saved the € and & characters. :cry:

26 Jul 2011, 7:34 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

What version of Zen Cart?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Jul 2011, 7:43 PM
#7
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #7 by athens_collectibles

Hi Doc! It's 1.3.9h (started with 1.3.9d and upgraded as each new version was released).

29 Jul 2011, 9:36 AM
#8
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #8 by athens_collectibles

Sorry to bring this up again, but can I please have an answer if this is something that can be corrected or should I despair and accept it as the editor's "nasty peculiarity". Many thanks for any reply.

29 Jul 2011, 9:41 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #9 by drbyte

That was a problem that existed in v1.3.8 and maybe early editions of v1.3.9.

But I just tested it in a clean install of v1.3.9h and the problem does NOT manifest there when using Plain Text mode.

Maybe you have old addons or outdated files that didn't properly get upgraded from the older versions.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jul 2011, 3:57 PM
#10
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #10 by athens_collectibles

Thanks for the reply. I found an amended (by me) in the past file: includes/functions/functions_general.php which I now replaced with the one from a clean install. This corrected half of the problem: the & and € do not change in the product description editor, but they still turn to & and € in the define pages editor.

Have you tested in both or do you have any ideas as to which other file could be causing this?

29 Jul 2011, 6:16 PM
#11
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #11 by athens_collectibles

Following my previous post, I did a clean install of 1.3.9h and tested again:

With the "Plain Text" editor, I selected Define Pages Editor > Main Page. I inserted the two characters & and € above the existing advertisement of the Zen Cart manual and clicked "save" as shown in the attached screen shot:

**I then selected Define Pages Editor > Main Page again and the two special characters had been converted to & and € as can be seen below:
**

The editor for product descriptions functions correctly.

Could this be a bug?

29 Jul 2011, 7:35 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #12 by drbyte

It does seem to be a problem with how the define-pages-editor screen works.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jul 2011, 7:42 PM
#13
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Post #13 by website_rob

Work-around for the time being would be to edit the Define file on your computer then upload the changed file.

The learning is in the doing.

Potent Products

29 Jul 2011, 7:55 PM
#14
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #14 by athens_collectibles

No problem. As long as it's not something wrong on my part, I leave it in the capable hands of the developers for future correction.

Rob, I already do what you suggest although it's easy to miss an ampersand in a URI. As for the € symbol, it doesn't give a validation error but is not displayed correctly in the bl:censored:dy IE if not entered as €

Thanks to everyone for listening. :smile:

3 Aug 2011, 7:29 PM
#15
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #15 by athens_collectibles

This is just an update for DrByte:

The same happens with the define meta tags editor. The & and € are converted to & and € once the page is saved and opened again.

This was tested on a clean ZC installation and I thought of advising you, so that a common fix could be applied when convenient.

9 Aug 2011, 6:35 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #16 by drbyte

Not sure if you've been participating in the v1.5.0BETA testing, but the updated zip posted today should accommodate these issues now.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Aug 2011, 7:33 PM
#17
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Post #17 by athens_collectibles

Thank you DrByte, I have seen the thread in 1.5 Beta about addressing these issues.

Although I would like to, I don't participate in the Beta at the moment a) because I don't have any time left to do that and b) because I'm 64 and not a programmer/developer, just a normal user struggling to set up an on line store.

It is encouraging though that an issue like this is addressed a few days after it was discovered and reported.

Keep up the good work and I'm trying to help as much as possible with my poor (compared to yours) knowledge by replying to a few simple questions raised in the forums.