1
irmtfan
Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/21 5:31

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Recently i tried to upgrade my very old xhelp module and after some local tests i upgrade my big website to xhelp 0.8 (trabis).
I have no error in local but in the website with more than 13,000 users i found these errors:

1- in xhelp/checkemail.php

Fatal error: Call to a member function getVar() on a non-object in /home/**USER**/public_html/modules/xhelp/class/notificationService.php on line 712

2- in modules/xhelp/admin/staff.php?op=clearOrphanedStaff
I have a blank page and I found that it is because of these lines in staff.php:
function clearOrphanedStaff()
{
    
$hMember =& xoops_gethandler('member');
    
$hStaff =& xhelpGetHandler('staff');
  
$users =& $hMember->getUserList();
$staff =& $hStaff->getObjects();

I found that getUserList function should be used with a criteria when the total members are large.

3- in ticket.php i have these mysql errors:
0.000068 SELECT FROM xhelp_staffroles WHERE (deptid '8' AND roleid IN ())
Error number1064
Error message
You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1
0.000043 
SELECT FROM xhelp_staff WHERE uid IN ()
Error number1064
Error message
You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

which im sure it is not related to xhelp 0.8 because i had this error with 0.79 too
It seems it is also related to number of members but i need to know how can i fix this too?
thank you for your help.
I have 14 departments and 14 emails assign to them.
xoops version is 2.5.5

I hope trabis could find some time for this great module.


Edit (on 2012-05-22):
Today i tried to register at xuups.com and write these bugs in the authors website, but it seems there is an error in the website. i received these erros in registeration:
Sorry, you have to agree to our disclaimer to get registered.
ERROR: Invalid email
ERROR: Invalid Username
Username is too short. It must be more than 3 characters.
ERROR: You must provide a password.
Invalid confirmation code!


2
irmtfan
Re: Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/27 8:08

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


I solved the third issue. the problem was in the previous upgrades in the xhelp_roles table.
anyway, I found another big issue.
in a fresh install this module set the collations to latin1 but the xoops charset is utf-8.

I think utf8_general_ci is the default collation now and all modules should recognise the xoops system charset. correct?

3
Mamba
Re: Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/27 8:47

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
I think utf8_general_ci is the default collation now and all modules should recognise the xoops system charset. correct?

That would be my understanding. Where did you download your version from? Let's see if we can replicate it, and if yes, then figure out how to fix it.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

4
irmtfan
Re: Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/27 9:35

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


from sf.net module repository:
http://sourceforge.net/projects/xoops/files/XOOPS%20Module%20Repository/XOOPS2/xHelp/

it is strange and i hope you and anyone else can reproduced it.

5
Mamba
Re: Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/27 10:16

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


I've installed on my local version of XOOPS 2.5.5, and could not reproduce it. All tables are UTF-8
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

6
irmtfan
Re: Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/27 11:24

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Yes, In a xoops fresh install everything is ok.
But i have this problem in a upgraded xoops to 2.5.5 and fresh xhelp module install .
It seems there is something somewhere and i suspect that it is in mainfile.php
because i have this line:
// Set the database charset if applicable
if (defined("XOOPS_DB_CHARSET")) die('Restricted Access');
define("XOOPS_DB_CHARSET""utf8");

any idea?

7
Mamba
Re: Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/27 11:52

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


This should have no impact.

What XOOPS version did you update it from?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

8
irmtfan
Re: Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/28 4:55

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


this website is rather old but i can remember that it was 2.3.2

anyway, in a short sentence i should state that I solved this issue too.

firstly i should stated that it is not the Xhelp issue but a xoops update/upgrade issue because i have this problem with every other module that i installed in the website after upgrading to xoops 2.5.5.
So, it is better to continue in another new topic after more test and try because i suspect that it is a xoops 2.5.5 issue.

To solve my issue in this specific website i did the following:
I tried to convert all tables to utf-8 again.
at the first i tried below script from trabis but it failed. this script even can not convert latin1 tables/structures to utf-8 in my old test databse.
topic:https://xoops.org/modules/newbb/viewtopic.php?post_id=341123#forumpost341123

link:
http://code.google.com/p/xuups/downloads/detail?name=dbupdate_1.1.zip

So i advise to not use this one.

Then i tried another older script introduced here:
https://xoops.org/modules/newbb/viewtopic.php?post_id=321964#forumpost321964
should be saved in your root website beside mainfile.php and with convert.php name.
<?php 

ini_set 
('max_execution_time''6000'); 
include_once 
'mainfile.php'
// ??????????? ?????? 
if( ! empty( $_POST['convert'] ) ) { 

    include 
XOOPS_ROOT_PATH.'/header.php'
     
    
$old_prefix XOOPS_DB_PREFIX

    
$srs $xoopsDB->queryF'SHOW TABLE STATUS FROM `'.XOOPS_DB_NAME.'`' ) ; 

    if( ! 
$xoopsDB->getRowsNum$srs ) ) die( "You are not allowed to copy tables" ) ; 

    
$count 0
    while( 
$row_table $xoopsDB->fetchArray$srs ) ) { 
        
$count ++ ; 
        
$old_table $row_table['Name'] ; 
        
// ???? ?????? ??????? ?? ???????? ???????? ??????, ?? ??????????... 
        
if( substr$old_table strlen$old_prefix ) + ) !== $old_prefix '_' ) continue ;
         
        
// ???????????? ??????? ? utf8 
        
$sql 'ALTER TABLE `'.$old_table.'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci';
        if(
$xoopsDB->queryF($sql)) { 
            echo 
'ok - '.$sql.'<br />'
        } else { 
            echo 
$xoopsDB->error().' - '.$sql.'<br />'
        } 
        
// ????????????? ????????? ????????????? ?????? 
        
$sql 'ALTER TABLE `'.$old_table.'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci';
        if(
$xoopsDB->queryF($sql)) { 
            echo 
'ok - '.$sql.'<br />'
        } else { 
            echo 
$xoopsDB->error().' - '.$sql.'<br />'
        } 

    } 
     
    
// ????????????? ????????? ???? ?????? 
    
$sql 'ALTER DATABASE `'.XOOPS_DB_NAME.'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci';
    if(
$xoopsDB->queryF($sql)) { 
        echo 
'ok - '.$sql.'<br />'
    } else { 
        echo 
$xoopsDB->error().' - '.$sql.'<br />'
    } 
    include 
XOOPS_ROOT_PATH.'/footer.php'

// ????? ????? 
} else { 
    include 
XOOPS_ROOT_PATH.'/header.php'
    
xoops_confirm(array('convert' => 1), 'convert.php''Convert in utf8?'); 
    include 
XOOPS_ROOT_PATH.'/footer.php'




?>


it works and the charming point is now the new installed modules are utf-8.
So again i should stated that we should test the xoops 2.5.5 upgrade script in converting database from latin1 to utf-8 because i think it is failed to do it right.

My main big very old website is still latin1 and i need to know how to convert tables using the xoops official upgrade script when i already upgrade to 2.5.5 and keep the charset as latin1?

i think a good tool to add to the maintenance in the next xoops versions (maybe 2.6) is the ability to convert charset from latin1 to utf8

9
irmtfan
Re: Xhelp 0.8 ( byTrabis) issues in a big website
  • 2012/5/28 5:28

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


I found another new bug in 0.8 version that 0.79 didnt have it.
- it can not create new ticket by email.
explanation: it fetch the email (the email is removed from the server) then in the "Mail Events" Tab of Xhelp module i can see Xhelp get the email:

Mailbox Event Class Description Time
info@MYWEBSITE.com Storage 2012/5/28 6:17:53

but the ticket is not created so the worst thing is the email is removed from server and went to the thin air!

Login

Who's Online

152 user(s) are online (81 user(s) are browsing Support Forums)


Members: 0


Guests: 152


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits