Jump to content


Photo

Can't log in after update

login bug signin

  • Please log in to reply
4 replies to this topic

#1 JezevecCZ

JezevecCZ

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 27 May 2014 - 10:58 AM

We have 14 users in our local instalation of Zurmo, after update to latest version 2.7.2 two of users are unable to log in.

 

If I verificate, it checks login/pass against dtb. If there is bad login/pass, than it displays it correctly. But after right login/pass is filled, than there is:

 

An error has occurred. Please click here to continue to the home page. If the error persists please contact your administrator.

htmlspecialchars(): Invalid multibyte sequence in argument
The reference id for this error is a967103499064b648334d10c65aedc4c.
And the bug than shows everytime if I tried to get even for entry page. Only if I delete cookies in browser, than I'm unable to get basic frontpage.
It last even if i change password for user and delete cache on server. Did someone else find this bug? Is there any hint?
Thanks.


#2 speixoto

speixoto

    Advanced Member

  • Members
  • PipPipPip
  • 386 posts

Posted 27 May 2014 - 02:14 PM

Can you turn debug mode on and parce the stack trace of the error?



#3 JezevecCZ

JezevecCZ

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 27 May 2014 - 08:11 PM

Collegue turned debug mode on and current result is:

 

PHP warning

htmlspecialchars(): Invalid multibyte sequence in argument

/var/www/courtofmoravia/zurmo/yii/framework/web/helpers/CHtml.php(98)

086 */
087 public static $renderSpecialAttributesValue=true;
088
089 /**
090 * Encodes special characters into HTML entities.
091 * The {@link CApplication::charset application charset} will be used for encoding.
092 * @param string $text data to be encoded
093 * @return string the encoded data
094 * @see http://www.php.net/m...pecialchars.php
095 */
096 public static function encode($text)
097 {
098 return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);
099 }
100
101 /**
102 * Decodes special HTML entities back to the corresponding characters.
103 * This is the opposite of {@link encode()}.
104 * @param string $text data to be decoded
105 * @return string the decoded data
106 * @see http://www.php.net/m...hars-decode.php
107 * @since 1.1.8
108 */
109 public static function decode($text)
110 {
Stack Trace #0
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/helpers/CHtml.php(98): htmlspecialchars()
 
#1
  /var/www/courtofmoravia/zurmo/app/protected/modules/zurmo/utils/AuditEventsRecentlyViewedUtil.php(97): CHtml::encode()
092 foreach ($recentlyViewedData as $recentlyViewed)
093 {
094 $recentlyViewedItem = array();
095 $moduleClassName = $recentlyViewed[0];
096 $modelId = $recentlyViewed[1];
097 $modelName = CHtml::encode(StringUtil::getChoppedStringContent($recentlyViewed[2], 40, ''));
098 $recentlyViewedItem['link'] = ZurmoHtml::link(
099 $itemLinkPrefix . ZurmoHtml::tag('span', array(), $modelName),
100 self::getRouteByRecentlyViewed($moduleClassName, $modelId));
101 $recentlyViewedItem['moduleClassName'] = $moduleClassName;
102 $recentlyViewedItems[] = $recentlyViewedItem;
#2
  /var/www/courtofmoravia/zurmo/app/protected/modules/zurmo/utils/ZurmoDefaultViewUtil.php(302): AuditEventsRecentlyViewedUtil::getRecentlyViewedItemsByUser(User, 10)
297 return $controller->resolveAndGetModuleId();
298 }
299
300 protected static function makeRecentlyViewedView()
301 {
302 $items = AuditEventsRecentlyViewedUtil::getRecentlyViewedItemsByUser(Yii::app()->user->userModel, 10);
303 return new RecentlyViewedView($items);
304 }
305
306 protected static function makeFlashMessageView(CController $controller)
307 {
#3
  /var/www/courtofmoravia/zurmo/app/protected/modules/zurmo/utils/ZurmoDefaultViewUtil.php(151): ZurmoDefaultViewUtil::makeRecentlyViewedView()
146 $aVerticalGridView = new GridView($verticalColumns, 1, 'nav', false);
147 $aVerticalGridView->setCssClasses( array('AppNavigation')); //navigation left column
148 $aVerticalGridView->setView(static::makeMenuView($controller), 0, 0);
149 if (static::$showRecentlyViewed)
150 {
151 $aVerticalGridView->setView(static::makeRecentlyViewedView(), 1, 0);
152 }
153 $aVerticalGridView->setView(new UserInterfaceChooserView(), ($verticalColumns - 1), 0);
154
155 $horizontalGridView = new GridView(1, 3, 'section', false);
156 $horizontalGridView->setCssClasses(array('AppContainer', 'container', 'clearfix')); //teh conatiner for the floated items
#4
+
  /var/www/courtofmoravia/zurmo/app/protected/modules/home/controllers/DefaultController.php(112): ZurmoDefaultViewUtil::makeStandardViewForCurrentUser(HomeDefaultController, WelcomeView)
 
#5
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/actions/CInlineAction.php(49): HomeDefaultController->actionWelcome()
 
#6
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array())
 
#7
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)
 
#8
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/filters/CFilter.php(40): CFilterChain->run()
 
#9
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/filters/CFilterChain.php(130): CFilter->filter(CFilterChain)
 
#10
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/CController.php(291): CFilterChain->run()
 
#11
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array(0 => array(0 => "application.modules.zurmo.controllers.filters.RightsControllerFi...", "moduleClassName" => "HomeModule", "rightName" => null), 1 => array(0 => "application.modules.zurmo.controllers.filters.RightsControllerFi...", "moduleClassName" => "HomeModule", "rightName" => null), 2 => array(0 => "application.modules.zurmo.controllers.filters.RightsControllerFi...", "moduleClassName" => "HomeModule", "rightName" => "Delete Dashboards"), 3 => array(0 => "application.modules.zurmo.controllers.filters.RightsControllerFi...", "moduleClassName" => "ZurmoModule", "rightName" => "Mass Update"), ...))
 
#12
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/CWebApplication.php(282): CController->run("welcome")
 
#13
+
  /var/www/courtofmoravia/zurmo/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("")
 
#14
+
  /var/www/courtofmoravia/zurmo/yii/framework/base/CApplication.php(169): CWebApplication->processRequest()
 
#15
+
  /var/www/courtofmoravia/zurmo/app/protected/core/components/WebApplication.php(75): CApplication->run()
 
#16
+
  /var/www/courtofmoravia/zurmo/app/index.php(70): WebApplication->run()


#4 speixoto

speixoto

    Advanced Member

  • Members
  • PipPipPip
  • 386 posts

Posted 27 May 2014 - 08:38 PM

Not sure what is happening but, to solve check it further try to doing this:

 

Add this after line 89 in AuditEventsRecentlyViewedUtil :         

die(print_r($recentlyViewedData));

 

Parse here the result

 

In the meanwhile you could comment the same line 89 in AuditEventsRecentlyViewedUtil and try to see if users can loggin.



#5 Smejko_cz

Smejko_cz

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 04 June 2014 - 03:28 PM

Hi, thanks for advice.

 

It was in some non-ansi character in some recent activity, I think in TasksModule.

I did ugly hotfix in AuditEventsRecentlyViewedUtil on line 97
 

- $modelName = CHtml::encode(StringUtil::getChoppedStringContent($recentlyViewed[2], 40, ''));

+ setlocale(LC_CTYPE, 'en_US.utf8');
+ $modelName = CHtml::encode(StringUtil::getChoppedStringContent(iconv('UTF-8', 'ASCII//TRANSLIT', $recentlyViewed[2]), 40, ''));

It isn't elegant fix but for me work and spend a little time :)

I have not good programing skill for make good fix but if Zurmo dev want I can try to reproduce this error and find which activity and what characters did this error.

 

Thanks for Zurmo a great product :)







Also tagged with one or more of these keywords: login, bug, signin

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users