HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[RESOLVED] javascript error when editing zone

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#68293 (In Topic #14519)
Avatar

Community saint

In v6.0.3, I get the following error on the "Edit zone" page when I press the save button.


Last edit: by temp1024

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68302
Avatar

Weird one this, I think you may have some odd form element in a panel. Anyway, fix attached (I think)…

Attachment
» Download: JAVASCRIPT_VALIDATION.tpl (27 Kb, 102 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68314
Avatar

Actually fix does not work because I get this on another report:
View topic: Deleting emoticons - ocPortal

So I will post a fix there when I've found it.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68317
Avatar

Community saint

Certainly would not have guessed that the other thread was related from first reading.

In any case, fix in other thread worked for me. Thanks again Chris  :thumbs: .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68352
Avatar

Fan in action

Hi, Chris!
1. Editing the zone.I don't recieve any error messages, but nothing happens when I press the SAVE button.
2. There seems to be an php error in admin_config.php



P.S.
Regarding 1., It's happened in IE9, switching to Chrome, I've got the same message. So I'm going to apply the same fix, for now.



Last edit: by Sherman
Back to the top
 
Posted
Rating:
#68353
Avatar

Could you post separately in the future please, as these two issues are not related to this topic.

1- did you try the fix posted in the topic I linked to above?

2- yes, I'm aware of this one actually, if you save the config it should go away. It was a bug in 6.0.2 I believe.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68354
Avatar

Fan in action

Yes, I've just tried. Recieved the same massage. I'm sorry for not distingvishing topics
Back to the top
 
Posted
Rating:
#68355
Avatar

Might be necessary to empty the template cache.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68356
Avatar

Fan in action

Do you mean I should empty whole temlates_cached/EN folder? Or just delete the JAVASCRIPT_VALIDATION.tpl.tcp?
Back to the top
 
Posted
Rating:
#68357
Avatar

latter. That's the pro way of doing it, most people would just go to Tools > cleanup tools :)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68376
Avatar

Fan in action

Thanks. Good to know there's Clean up site option. I've noticed it's deleting files selectively. So there's no JAVASCRIPT_VALIDATION.tpl.tcp in the folder, but unfortunately I still recieve the same message. And therefore I'am not able to edit Zone.
Conserning the other bug 2 issue, I am going to ad to Deploying section.
Back to the top
 
Posted
Rating:
#68377
Avatar

Sorry actually you should use the cleanup tools, because for the case of Javascript files there is a .tcp file but also could be several .js files for that too. It's better to just wipe it all.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68380
Avatar

Fan in action

Yes, I did, wiped them all. Same message, sorry…
Back to the top
 
Posted
Rating:
#68396
Avatar

I'm absolutely sure the fix works here, so it could be a few things:
  • caching in your web browser (some browsers cache when they shouldn't)
  • similar, but maybe by your ISP
  • somehow accidentally replacing the wrong file
  • if you have an override to JAVASCRIPT_VALIDATION.tpl in a templates_custom folder

I am reuploading again just in case.

Attachment
» Download: JAVASCRIPT_VALIDATION.tpl (27 Kb, 96 downloads so far)


Specifically what I changed was the 'cleverFindValue' function, to:

Code

function cleverFindValue(theForm,theElement)
{
   var myValue=(typeof window.getTextbox=='undefined')?theElement.value:getTextbox(theElement);
   if (theElement.getAttribute('type')=='radio')
   {
      myValue='';
      for (var i=0;i<theForm.elements.length;i++)
      {
         if ((theForm.elements[i].checked) && (theForm.elements[i].name==theElement.name))
            myValue=theForm.elements[i].value;
      }
   }
   if ((theElement.nodeName.toLowerCase()=='select') && (theElement.selectedIndex>=0))
   {
      myValue=theElement.options[theElement.selectedIndex].value;
      if ((myValue=='') && (theElement.getAttribute('size')>1)) myValue='-1'; // Fudge, as we have selected something explicitly that is blank
   }
   if (myValue===null) myValue='';
   return myValue;
}


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68402

Non-joined user

Following thoroughly your instructions brought me to this stunning outcome.

Not in IE9 though! Tested in Mozzila, Chrome and Safari
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: