Different sideboxes in "advanced" theme uses same user-object

6 views
Skip to first unread message

Alexander Obuhovich

unread,
Aug 8, 2011, 4:04:55 AM8/8/11
to In-Portal Development
I've noticed, that these sideboxes:
  • login
  • subscribe to mailing
  • recommend site
share same user object for data validation and processing.

I'm proposing to assign "special" to each of sideboxes so data don't get mixed, like <inp2:u.login .../> ; <inp2:u.subscriber .../> and <inp2:u.recommend .../>

Now error will be raised, that there is no ID in request for mentioned above Specials. Now we need to change UsersEventHandler::getPassedID method to return current user's id for these specials.


--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Phil -- wbtc.fr --

unread,
Aug 8, 2011, 6:08:45 AM8/8/11
to in-por...@googlegroups.com
I also found the case, when I  hit enter on the left login box on platform/login/register page (with empty fields or wrong login): there's also the standard warning raising on main page on top of registration form. May it's not related?

2011/8/8 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Aug 8, 2011, 6:23:31 AM8/8/11
to in-por...@googlegroups.com
I've noticed, that when you haven't filled "e-mail" on registration form, then error is shown on both:
  • registration form
  • one of sideboxes on the left

Phil -- wbtc.fr --

unread,
Aug 8, 2011, 6:42:27 AM8/8/11
to in-por...@googlegroups.com
same thing if you enter a wrong login/password

Alexander Obuhovich

unread,
Aug 10, 2011, 5:35:58 AM8/10/11
to in-por...@googlegroups.com
Here is a example, when forgot password and recommend forms share error message. Found on In-Portal 5.1.2
forgot_and_recomment_mix_errors.png

Alexander Obuhovich

unread,
Aug 10, 2011, 6:15:24 AM8/10/11
to in-por...@googlegroups.com
sidebox_mix_errors_fix_core.patch
sidebox_mix_errors_fix_themes.patch

Dmitry A.

unread,
Aug 15, 2011, 12:13:37 AM8/15/11
to in-por...@googlegroups.com
Great approach to this issue.

This has been tested!


DA

Nikita

unread,
Oct 27, 2011, 10:21:08 AM10/27/11
to in-por...@googlegroups.com
Those fixes should work as expected for sure, but i see them as a pretty much wrong way of doing it (adding new additional fields and so on) cause it wont resolve the problem for other similar cases (other prefixes etc).
Sadly to admit, but we still use non-ajax forms. If we wont do so i would recommend fixing this problem just by sending form id along with the form data and back again with response. In such way we could have this problem eliminated and configs left clean, with no additional fields.

Dmitry Andrejev

unread,
Oct 27, 2011, 10:30:25 AM10/27/11
to in-por...@googlegroups.com
Thanks for feedback Nikita,

Agreed that Ajax forms are okay to use, but are totally different animal. Alex has introduced much more advanced functionality in 5.2.0 for this.

-- 


Best regards,

Dmitry A.

Alexander Obuhovich

unread,
Oct 27, 2011, 10:36:15 AM10/27/11
to in-por...@googlegroups.com
Nikita, we actually do send form ID (name) along with form data to the server right now (in 5.2.0+).

Only difference is, that form specific fields are not defined in global scope (for all unit config usage cases), but only for a specific form. You can see users_config.php file to get the idea.


Phil -- wbtc.fr --

unread,
Oct 27, 2011, 11:57:12 AM10/27/11
to in-por...@googlegroups.com
reading Ajax make me dreaming... because this is mainly what In-Portal is missing actualy, either on front or back-end, to compete with other CMS... just a thought ^^

2011/10/27 Alexander Obuhovich <aik....@gmail.com>
Reply all
Reply to author
Forward
0 new messages