Loading...
 
Features / Usability

Features / Usability


Ajax in Tiki and runPassword() function

posts: 42 Spain

Hello,
Well, maybe this is not the right place for this issue, if so, I apologize.

I'm just an amateur programmer, and I've never worked with Smarty, so I started doing some research, and I wanted to see how Tiki uses Ajax with PHP and Smarty.

For this I followed the control of the strength of a new password that is done in the registration process of a new user.
I have understand it quite well, but I have stuck in this.
I have seen that there is an important function called "runPassword (strPassword, strFieldID)", which is in the library "tiki-js.js", and just to investigate I have done some tests modifications in this function, but whatever I do always works fine, it seems that this is not the function that is executed.

For example, I have changed the name to the function, I have put a "return;" in the first line of de function, but the system continues working, that is, while the password is written, the force is calculated and the text that indicates is updated.

The only way in which the calculation of the strength of the paswoerd stops working is not to make the call of the "runPassword" function, so surely it is necessary for it to work.

I thought there was another function with the same name in another folder, but I have search everywhere and not find.

Could someone give me some clue as to why this happens?
What am I doing wrong?

Thank you very much and cordial greetings

Santi Peralta

posts: 1001 Canada

Welcome to Tiki Santiago,
I am not really familiar with that function, but my best guess as to the problem would be that your browser is running a cached version of the function. To avoid that, you can try with a different browser profile, or clear your cache. Most browsers allow refreshing all resources using the Ctrl+F5 keyboard shortcut, but it may be more complicated in Google Chrome.


posts: 84436

Hi Santi Peralta

What kind of development environment do you have set up? Are you running a local copy of Tiki intended for developers to test this? I'm not sure all the caching options in Tiki but know there are settings that can drive a developer nuts. Such as JS minification.

I did a quick search for duplicate function names, and there is none.

(I know its dumb) but I've sometimes found myself in the wrong branch of Tiki, trying to view changes that I made on another.

When you view the source code or inline DOM viewer does it also do the same thing? How about when you make the changes directly into your DOM viewer?

Make sure you're actually saving your file, and it's being saved in the right location (another dumb one again, I know)

In the browsers, I use the force refresh is generally shift (while hitting the refresh button) that's an important feature. But you can also view what resources were re-downloaded by viewing the "network tab" in the DOM viewer.

Most of us working on Tiki are using the PhpStorm editor. It might help remove some possible errors, for example, it has inline error checking and auto-saves as you type. Its a great editor. I don't do much JS coding but know it does have JS functionality as well.

Hope some of these ideas might help, or at the very least are things to consider or eliminate as possible causes of the issue.

Happy to help more if I know a little more about how you're going about this task.

Brendan


posts: 42 Spain

Hi friends
Well....., I work with a local copy in Wamp environment and the editor that I use is the Notepad ++ I'll take a look at the phpstorm, to see how it works.
Effectively, my problem was the cache, I deleted the tiki cache and the Chrome cache several times, and everything works fine.

Thank you very much for your help.

Santi Peralta


posts: 1001 Canada

My pleasure Santiago,
PhpStorm is a proprietary product which you need to pay for, I would not recommend it just for casual use. If you want a better IDE for casual use, I suggest Visual Studio Code or Eclipse for PHP developers.


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting