VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: gtrhangar on January 05, 2012, 17:30:33 PM

Title: Can't Insert code in Product Page
Post by: gtrhangar on January 05, 2012, 17:30:33 PM
When I try to insert a code for a form on the product page within the description and hit apply all the changes get erased and it reverts to previous.

As a matter of fact anything I do when in code view it deletes when I press apply!!!

Please Help

Joomla 1.5 and virtuemart 2.0stable
Title: Re: Can't Insert code in Product Page
Post by: adham on January 06, 2012, 13:48:02 PM
it is an editor issue if you are using JCE or similar try with no editor does it do the same thing?
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 07, 2012, 15:02:55 PM

Joomla 1.7.2 and Virtuemart 2.0

It is impossible to insert neither code, nor text in the product description window. After some ammount a symbols, all what I entered is erased as soon as I pressed a save button. I tried JCE Editor, CK Editor, AND WITHOUT ANY EDITOR!


:( :( :( :( :( :( :( :(
Title: Re: Can't Insert code in Product Page
Post by: adham on January 08, 2012, 08:16:42 AM
It might be a Joomla 1.7 issue as I can insert code in J 1.5 (HTML and PHP) maybe someone who have a J 1.7 can test and see
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 08, 2012, 11:16:55 AM
I had this problem only when I updated Virtuemart on my site to version RC3 and then 2.0.0 Final from Virtuemart RC2M.
Before update it's all right!
What was changed in the code? What was happened? Please, somebody, help!
:'( :'( :'( :'( :'(
Title: Re: Can't Insert code in Product Page
Post by: jenkinhill on January 08, 2012, 11:46:07 AM
IIRC this was found to be a security problem. The entry is now sanitized to ensure that VirtueMart is as secure as possible, will pass PCI scans and will not represent a security hole for the future. Personally I would like to be able to insert Joomla plugins into the description text, as with VM1.1
Title: Re: Can't Insert code in Product Page
Post by: Milbo on January 08, 2012, 13:29:33 PM
AFAIK you can do that.
Title: Re: Can't Insert code in Product Page
Post by: jenkinhill on January 08, 2012, 16:26:11 PM
Max, neither loadposition for modules nor Joomla plugins work in the product description text although "Enable Joomla Plugin " is selected. (J1.7)
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 08, 2012, 18:08:42 PM
Hi, can you need help with testing Virtuemart 2.0 on a real site? I can help you find errors.
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 08, 2012, 18:10:46 PM
www.pc-electronics.am
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 11, 2012, 06:25:21 AM
Sorry, and what can I do to run some of editors? Thank's!
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 11, 2012, 08:59:30 AM
Please, help me. What can I change in code to get supporting plugins in product description?
Thank's a lot!
Title: Re: Can't Insert code in Product Page
Post by: PRO on January 11, 2012, 11:06:44 AM
do any html changes work? if not, its going to be because you are not admin (look in shoppers)
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 11, 2012, 13:09:31 PM
Hello!
Thank's a lot for your reply.
Yes, I'm an admin.

I had build the shop using Joomla 1.7.2 and Virtuemart RC2. Till RC2M version I haven't any problem with product's description's: I just copy/paste descriptions from other sites, and all is right.
When Virtuemart 2.0.0 is released, I maked a backup of whole site, and updated it to RC3, using ALL instructions for update from RC2M to RC3, then I updated it to 2.0.0 version.

After that, when I test site, when I was opening product (in frontend, and in backend), whos description contained HTML, the browser page goes not responding until I closed page.
After that I'd removed ALL Formatting from descriptions. Now, without styling, I can save in product description some text, but, when I trying to insert HTML styled content, it was cutting a lot of text when saving, and not responding.
I try most recent versions of CKeditor, JCE - but problem still exist. You can see www.pc-electronics.am site, for example, printers.

Sorry for my bad English.
If you can help me, I can answer to any your question.
Thank's!


Best regards,
Samson Tumanyan, Yerevan, Armenia.
Title: Can't Insert code in Product Page
Post by: samsontumanyan on January 13, 2012, 12:58:15 PM
Can anybody help me or no?
Thank's a lot
Title: Re: Can't Insert code in Product Page
Post by: PRO on January 13, 2012, 14:24:33 PM
when you to shoppers, does it say this by your name
admin / (Super Users)
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 14, 2012, 08:02:56 AM
samsontumanyan    Super User    admin / (deprecated)    Gold Level


and I can't select "Super User" in group option... after selecting and saving, it's alrady sayd: "Select an Option"

Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 14, 2012, 08:43:49 AM
I created a new user and passed to him admin privilege, login using new user, but the problem still exist. :(

[attachment cleanup by admin]
Title: Re: Can't Insert code in Product Page
Post by: PRO on January 14, 2012, 14:30:02 PM
do you have a default editor set?

also
http://community.joomla.org/featured-articles/did-you-know/748-wysiwyg-editor-removes-html-code.html
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 14, 2012, 14:36:11 PM
I have following editors: JCE, CKEditor, CodeMirror, TinyMCE
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 14, 2012, 14:43:32 PM
I can get you an access to my site admin panel.
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 18, 2012, 07:14:42 AM
Здравствуйте!
Народ, простите, но уже просто сил нет писать Вам на английском.

У меня создается впечатление, что Вы убегаете от решения проблемы, описанной мною.
Я даже предложил доступ к админ панели моего сайта.
Я даже заново проинсталлировал чистую Joomla 1.7.3 + VM 2.0 и протестировал: ОШИБКА ЕСТЬ!
Мало того, что HTML не сохраняется, портится и все портит, так еще и простой текст слишком длинный не сохраняется, обрезается при сохранении.
ВСЕ БЫЛО ХОРОШО В Virtuemart 1.9.8RC2M     !!!!!!!!!!
Потом Вы написали, что улучшили рабору плагинов - не знаю, что Вы там улучшили, но, по-моемому, по пути что-то испортили.

ВЫ МОЖЕТЕ ДАТЬ МНЕ ИСЧЕРПЫВАЮЩИЙ ОТВЕТ!?????????


Заранее благодарен,
Самсон Туманян, Ереван, Армения
+374 93 64-14-41
Title: Re: Can't Insert code in Product Page
Post by: balai on January 18, 2012, 10:54:48 AM
Concerning the content plugin loading its easy to be solved
In the file components\com_virtuemart\views\productdetails\view.html.php

In the lines 104-105
change the code

$results = $dispatcher->trigger('onPrepareContent',
array (& $product, & $params, 0));


to

$results = $dispatcher->trigger('onContentPrepare',
array ('',& $product, & $params, 0));


It is just using wrong event name, also the param array get the context as 1st value and then the content object
Title: Re: Can't Insert code in Product Page
Post by: Milbo on January 18, 2012, 11:28:26 AM
Priviet,
Thanks to google translator, I have an idea, what you are talking about.

the next revision, we are working on, solves your problem with the truncated text files. There is a possiblity to set it to unlimited text lenght. The problem is that multibyte chars like russian letters take twice the space.

that html is not stored is strange, but be aware that it depends ALSO on the options of your used editor.

The content plugin thing is also solved in the svn.
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 18, 2012, 13:05:37 PM
Thank you!
I done this change, but the problem is still exist...:(((
Please, I can give you access to admin panel of my site, help me!!!
Please!
I want to know, what kind of problem I have. You, as developer, just see it and I think you can help me in one moment.
   
What is SVN?

Thank's a lot for your's reply!

Best regards,
Samson Tumanyan, Yerevan, Armenia.
Title: Re: Can't Insert code in Product Page
Post by: maurolonga on January 19, 2012, 18:05:15 PM

I confirm what samsontumanyan says and that VM does not allow to put any HTML in the product description, it just strips all of it.
I use
Joomla 1.7.x
VM 2.0 latest stable release
JCE with all allowed (JS, PHP, all ok)
Joomla Articles whitelisted (in settings) with HTML allowed

Despite that, VM will not save any change made with JCE in the Product Description, whether the editor is on or the show/hide is on (not manually, not through the editor). Also tried all settings in backend to English instead of Spanish, backend admin works a bit quicker and no flaws (es version has some troubles sometimes).

Can you point me where VM overrides those settings?
Thank you
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 21, 2012, 09:05:06 AM
When I using Virtuemart 1.9.8RC2M, I have't any problems neither with HTML inserting and saving in product description, nor with russian and/or english content length. Whats happen? Please, answer on my question.
Regards.
Title: Re: Can't Insert code in Product Page
Post by: Milbo on January 21, 2012, 12:57:12 PM
I think the check Perm is not running correct in j1.7 and is not giving admin rights. It is also fixed in the svn.
Title: Re: Can't Insert code in Product Page
Post by: samsontumanyan on January 21, 2012, 13:00:03 PM
Thank's!
Sorry, but what is "svn"?

Subversion? And where I can download it?

Title: Re: Can't Insert code in Product Page
Post by: jenkinhill on January 21, 2012, 14:36:47 PM
See http://dev.virtuemart.net/projects/virtuemart/wiki/Setting_up_a_Development_Environment