search problem in G2 latest build 20040308

mactable

Joined: 2005-01-24
Posts: 34
Posted: Tue, 2005-03-08 21:16

i have just upgraded my G2 from alpha4 to latest build 20040308.
i am sure that search function do it's job in version alpha4 but some problem in latest build.

searching "numbers" or english is ok, but when i search for chinese wordings, error occurs as followings:

An error has occurred while interacting with the database.
The exact nature of database errors is not captured unless Gallery debug mode is enabled in config.php. Before seeking support for this error please enable buffered debug output and retry the operation. Look near the bottom of the lengthy debug output to find error details.

in D:\sites\pix\www\gallery2\modules\core\classes\GalleryStorage\DatabaseStorage.class at line 1132 (gallerystatus::error)
in D:\sites\pix\www\gallery2\modules\core\classes\GalleryStorage.class at line 220 (mysqldatabasestorage::search)
in D:\sites\pix\www\gallery2\modules\core\classes\Gallery.class at line 189 (gallerystorage::search)
in D:\sites\pix\www\gallery2\modules\core\classes\GalleryCoreSearch.class at line 166 (gallery::search)
in D:\sites\pix\www\gallery2\modules\search\SearchScan.inc at line 175 (gallerycoresearch::search)
in D:\sites\pix\www\gallery2\modules\core\classes\GalleryView.class at line 246 (searchscanview::loadtemplate)
in D:\sites\pix\www\gallery2\main.php at line 286 (searchscanview::doloadtemplate)
in D:\sites\pix\www\gallery2\main.php at line 46
in D:\sites\pix\www\gallery2\main.php at line 39

System Information
Gallery version 2.0-beta-1
PHP version 4.3.10 apache2handler
Webserver Apache/2.0.53 (Win32) PHP/4.3.10
Database mysqlt 4.1.9-nt
Toolkits Gd, SquareThumb
Operating system Windows NT XXXXXX 5.2 build 3790
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)

----

Gallery URL (optional): http://gallery.ecinfo.org
Gallery version: G2 beat1 build 20040308
Webserver (with version): apache 2.0.53 win32
Datatabase (with version): mysql 4.1.9
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system: win2003
Web browser/version: Ie6, ff
G1 version (for migration bugs):

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-08 23:01
mactable wrote:
The exact nature of database errors is not captured unless Gallery debug mode is enabled in config.php. Before seeking support for this error please enable buffered debug output and retry the operation. Look near the bottom of the lengthy debug output to find error details.

so, did you do this?

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Wed, 2005-03-09 16:29

here is more details:

Error (ERROR_STORAGE_FAILURE):
in file D:\sites\pix\www\gallery2\modules\core\classes\GalleryStorage\DatabaseStorage.class at line 1132 (gallerystatus::error)
in file D:\sites\pix\www\gallery2\modules\core\classes\GalleryStorage.class at line 220 (mysqldatabasestorage::search)
in file D:\sites\pix\www\gallery2\modules\core\classes\Gallery.class at line 189 (gallerystorage::search)
in file D:\sites\pix\www\gallery2\modules\core\classes\GalleryCoreSearch.class at line 166 (gallery::search)
in file D:\sites\pix\www\gallery2\modules\search\SearchScan.inc at line 175 (gallerycoresearch::search)
in file D:\sites\pix\www\gallery2\modules\core\classes\GalleryView.class at line 246 (searchscanview::loadtemplate)
in file D:\sites\pix\www\gallery2\main.php at line 286 (searchscanview::doloadtemplate)
in file D:\sites\pix\www\gallery2\main.php at line 46
in file D:\sites\pix\www\gallery2\main.php at line 39
System Information
Gallery version 2.0-beta-1
PHP version 4.3.10 apache2handler
Webserver Apache/2.0.53 (Win32) PHP/4.3.10
Database mysqlt 4.1.9-nt
Toolkits Gd, SquareThumb
Operating system Windows NT ECINFO-EXP 5.2 build 3790
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)
Gallery 除錯(Debug))輸出
file_exists(D:\sites\pix\www\gallery2data\cache\module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
Unimplemented: GalleryUrlGenerator
file_exists(D:\sites\pix\www\gallery2data\sessions\c75fcb68a531de9d7a7bca5d54701422)
clearstatcache()
filesize(D:\sites\pix\www\gallery2data\sessions\c75fcb68a531de9d7a7bca5d54701422)
fopen(D:\sites\pix\www\gallery2data\sessions\c75fcb68a531de9d7a7bca5d54701422,
rb, 0)
flock(Resource id #30, 6, )
fread(Resource id #30, 3227)
flock(Resource id #30, 3, )
fclose(Resource id #30)
Branched navigation: x128e1e5a
file_exists(D:\sites\pix\www\gallery2\modules\core\classes\helpers/../../../../modules/search/module.inc)
realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
Binding text domain: modules_search ->
D:\sites\pix\www\gallery2/modules/search/locale
file_exists(D:\sites\pix\www\gallery2data\cache\module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes/../../../modules/search/SearchScan.inc)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes/../../../modules/search/SearchScan.inc)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes\helpers/../../../../modules/core/module.inc)
realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
Binding text domain: modules_core ->
D:\sites\pix\www\gallery2/modules/core/locale
file_exists(D:\sites\pix\www\gallery2data\\versions.dat)
file(D:\sites\pix\www\gallery2data\\versions.dat, )
[1110385645] can't guarantee 5 -- extending!
file_exists(D:\sites\pix\www\gallery2data\cache\entity/5/1/510.inc)
file_exists(D:\sites\pix\www\gallery2data\cache\module/core/0/0/0.inc)
realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes\helpers/../../../../modules/core/classes/GalleryCoreSearch.class)
--------------------------------------------------------------------------------
(mysqlt): ROLLBACK
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SET AUTOCOMMIT=1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt):
SELECT
g2_Group.g_id,
g2_Group.g_groupName
FROM
g2_UserGroupMap, g2_Group
WHERE
g2_Group.g_id = g2_UserGroupMap.g_groupId
AND
g2_UserGroupMap.g_userId = 510
ORDER BY
g2_Group.g_groupName
LIMIT 18446744073709551615
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt):
SELECT
g2_PermissionSetMap.g_module,
g2_PermissionSetMap.g_permission,
g2_PermissionSetMap.g_description,
g2_PermissionSetMap.g_bits,
g2_PermissionSetMap.g_flags
FROM
g2_PermissionSetMap

--------------------------------------------------------------------------------

mysqlt error: [1267: Illegal mix of collations (ascii_general_ci,IMPLICIT)
and (utf8_general_ci,COERCIBLE) for operation 'like'] in EXECUTE("
SELECT
COUNT(DISTINCT g2_Item.g_id)
FROM
g2_Item, g2_PermissionMap
WHERE
(g2_Item.g_description LIKE '%倒數%' OR g2_Item.g_keywords
LIKE '%倒數%' OR g2_Item.g_summary LIKE '%倒數%' OR g2_Item.g_title
LIKE '%倒數%')
AND
g2_Item.g_id = g2_PermissionMap.g_itemId
AND
(g2_PermissionMap.g_userId = 510
OR
g2_PermissionMap.g_groupId IN (1, 3, 10, 2))
AND
g2_PermissionMap.g_permission & 1 = 1")

--------------------------------------------------------------------------------
(mysqlt):
SELECT
COUNT(DISTINCT g2_Item.g_id)
FROM
g2_Item, g2_PermissionMap
WHERE
(g2_Item.g_description LIKE '%倒數%' OR g2_Item.g_keywords
LIKE '%倒數%' OR g2_Item.g_summary LIKE '%倒數%' OR g2_Item.g_title
LIKE '%倒數%')
AND
g2_Item.g_id = g2_PermissionMap.g_itemId
AND
(g2_PermissionMap.g_userId = 510
OR
g2_PermissionMap.g_groupId IN (1, 3, 10, 2))
AND
g2_PermissionMap.g_permission & 1 = 1
--------------------------------------------------------------------------------
1267: Illegal mix of collations (ascii_general_ci,IMPLICIT) and
(utf8_general_ci,COERCIBLE) for operation 'like'

adodb_mysqlt._execute(
SELECT
COUNT(DISTINCT g2_Item.g_id)
F...) % line 818, file: adodb.inc.php
adodb_mysqlt.execute(
SELECT
COUNT(DISTINCT g2_Item.g_id)
F..., Array[11]) % line 1124,
file: DatabaseStorage.class
mysqldatabasestorage.search(
SELECT
COUNT(DISTINCT [GalleryItem::id])
..., Array[11], Array[0]) % line
220, file: GalleryStorage.class
gallerystorage.search(
SELECT
COUNT(DISTINCT [GalleryItem::id])
..., Array[11], Array[0]) % line
189, file: Gallery.class
gallery.search(
SELECT
COUNT(DISTINCT [GalleryItem::id])
..., Array[11]) % line 166, file:
GalleryCoreSearch.class

realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
--------------------------------------------------------------------------------
(mysqlt):
SELECT
g2_UserGroupMap.g_userId
FROM
g2_UserGroupMap
WHERE
g2_UserGroupMap.g_userId = 510
AND
g2_UserGroupMap.g_groupId = '2'
LIMIT 1
--------------------------------------------------------------------------------

realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../../)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes\helpers/../../../../modules/debug/classes/DebugStatusFormatter.class)
file_exists(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668)
is_dir(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668)
file_exists(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668)
is_writeable(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668)
file_exists(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668/v_4)
file_exists(D:\sites\pix\www\gallery2\modules\debug\classes/../templates/local/DebugStatusFormatter.tpl)
stat(D:\sites\pix\www\gallery2\modules\debug\classes/../templates/DebugStatusFormatter.tpl)
realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
Binding text domain: modules_debug ->
D:\sites\pix\www\gallery2/modules/debug/locale

Gallery 除錯(Debug))輸出
file_exists(D:\sites\pix\www\gallery2data\cache\module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
Unimplemented: GalleryUrlGenerator
file_exists(D:\sites\pix\www\gallery2data\sessions\c75fcb68a531de9d7a7bca5d54701422)
clearstatcache()
filesize(D:\sites\pix\www\gallery2data\sessions\c75fcb68a531de9d7a7bca5d54701422)
fopen(D:\sites\pix\www\gallery2data\sessions\c75fcb68a531de9d7a7bca5d54701422,
rb, 0)
flock(Resource id #30, 6, )
fread(Resource id #30, 3227)
flock(Resource id #30, 3, )
fclose(Resource id #30)
Branched navigation: x128e1e5a
file_exists(D:\sites\pix\www\gallery2\modules\core\classes\helpers/../../../../modules/search/module.inc)
realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
Binding text domain: modules_search ->
D:\sites\pix\www\gallery2/modules/search/locale
file_exists(D:\sites\pix\www\gallery2data\cache\module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes/../../../modules/search/SearchScan.inc)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes/../../../modules/search/SearchScan.inc)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes\helpers/../../../../modules/core/module.inc)
realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
Binding text domain: modules_core ->
D:\sites\pix\www\gallery2/modules/core/locale
file_exists(D:\sites\pix\www\gallery2data\\versions.dat)
file(D:\sites\pix\www\gallery2data\\versions.dat, )
[1110385645] can't guarantee 5 -- extending!
file_exists(D:\sites\pix\www\gallery2data\cache\entity/5/1/510.inc)
file_exists(D:\sites\pix\www\gallery2data\cache\module/core/0/0/0.inc)
realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes\helpers/../../../../modules/core/classes/GalleryCoreSearch.class)
--------------------------------------------------------------------------------
(mysqlt): ROLLBACK
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SET AUTOCOMMIT=1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt):
SELECT
g2_Group.g_id,
g2_Group.g_groupName
FROM
g2_UserGroupMap, g2_Group
WHERE
g2_Group.g_id = g2_UserGroupMap.g_groupId
AND
g2_UserGroupMap.g_userId = 510
ORDER BY
g2_Group.g_groupName
LIMIT 18446744073709551615
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt):
SELECT
g2_PermissionSetMap.g_module,
g2_PermissionSetMap.g_permission,
g2_PermissionSetMap.g_description,
g2_PermissionSetMap.g_bits,
g2_PermissionSetMap.g_flags
FROM
g2_PermissionSetMap

--------------------------------------------------------------------------------

mysqlt error: [1267: Illegal mix of collations (ascii_general_ci,IMPLICIT)
and (utf8_general_ci,COERCIBLE) for operation 'like'] in EXECUTE("
SELECT
COUNT(DISTINCT g2_Item.g_id)
FROM
g2_Item, g2_PermissionMap
WHERE
(g2_Item.g_description LIKE '%倒數%' OR g2_Item.g_keywords
LIKE '%倒數%' OR g2_Item.g_summary LIKE '%倒數%' OR g2_Item.g_title
LIKE '%倒數%')
AND
g2_Item.g_id = g2_PermissionMap.g_itemId
AND
(g2_PermissionMap.g_userId = 510
OR
g2_PermissionMap.g_groupId IN (1, 3, 10, 2))
AND
g2_PermissionMap.g_permission & 1 = 1")

--------------------------------------------------------------------------------
(mysqlt):
SELECT
COUNT(DISTINCT g2_Item.g_id)
FROM
g2_Item, g2_PermissionMap
WHERE
(g2_Item.g_description LIKE '%倒數%' OR g2_Item.g_keywords
LIKE '%倒數%' OR g2_Item.g_summary LIKE '%倒數%' OR g2_Item.g_title
LIKE '%倒數%')
AND
g2_Item.g_id = g2_PermissionMap.g_itemId
AND
(g2_PermissionMap.g_userId = 510
OR
g2_PermissionMap.g_groupId IN (1, 3, 10, 2))
AND
g2_PermissionMap.g_permission & 1 = 1
--------------------------------------------------------------------------------
1267: Illegal mix of collations (ascii_general_ci,IMPLICIT) and
(utf8_general_ci,COERCIBLE) for operation 'like'

adodb_mysqlt._execute(
SELECT
COUNT(DISTINCT g2_Item.g_id)
F...) % line 818, file: adodb.inc.php
adodb_mysqlt.execute(
SELECT
COUNT(DISTINCT g2_Item.g_id)
F..., Array[11]) % line 1124,
file: DatabaseStorage.class
mysqldatabasestorage.search(
SELECT
COUNT(DISTINCT [GalleryItem::id])
..., Array[11], Array[0]) % line
220, file: GalleryStorage.class
gallerystorage.search(
SELECT
COUNT(DISTINCT [GalleryItem::id])
..., Array[11], Array[0]) % line
189, file: Gallery.class
gallery.search(
SELECT
COUNT(DISTINCT [GalleryItem::id])
..., Array[11]) % line 166, file:
GalleryCoreSearch.class

realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
--------------------------------------------------------------------------------
(mysqlt):
SELECT
g2_UserGroupMap.g_userId
FROM
g2_UserGroupMap
WHERE
g2_UserGroupMap.g_userId = 510
AND
g2_UserGroupMap.g_groupId = '2'
LIMIT 1
--------------------------------------------------------------------------------

realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../../)
file_exists(D:\sites\pix\www\gallery2\modules\core\classes\helpers/../../../../modules/debug/classes/DebugStatusFormatter.class)
file_exists(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668)
is_dir(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668)
file_exists(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668)
is_writeable(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668)
file_exists(D:\sites\pix\www\gallery2data\smarty\templates_c\%%3905312668/v_4)
file_exists(D:\sites\pix\www\gallery2\modules\debug\classes/../templates/local/DebugStatusFormatter.tpl)
stat(D:\sites\pix\www\gallery2\modules\debug\classes/../templates/DebugStatusFormatter.tpl)
realpath(D:\sites\pix\www\gallery2\modules\core\classes/../../..)
Binding text domain: modules_debug ->
D:\sites\pix\www\gallery2/modules/debug/locale

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-03-09 16:41

google for 1267 "Illegal mix of collations"
you can find things like this
does this help?

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Wed, 2005-03-09 17:26

hm... not very help, i have tried to change the default connection to ascii, this time no error occur, but also no result return (cannot search any chinese woridings)

No results found for '倒數'

FYI , in the last verison (G2 alpha4), even my G2 databse is encoded in ascii, and the deault connection is utf8, no error occur and i could search any chinese.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-03-09 20:42

we now store utf8 data directly in the db instead of encoding it.. this is a huge space saving in the db... of course, we do need to get search working. can you set everything (table, connection) to utf8? perhaps that works.. anyone else have experience matching utf8 data in mysql db?

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Wed, 2005-03-09 21:11

ok, i have tried to use phpmyadmin to dump out my original data, and changed the dump file (from ascii to utf8) , but there is error to restore back to mysql and stopped at here:

CREATE TABLE `g2_pluginparametermap` (
`g_pluginType` varchar(128) NOT NULL default '',
`g_pluginId` varchar(128) NOT NULL default '',
`g_itemId` int(11) NOT NULL default '0',
`g_parameterName` varchar(128) NOT NULL default '',
`g_parameterValue` varchar(255) NOT NULL default '',
UNIQUE KEY `g_pluginType` (`g_pluginType`,`g_pluginId`,`g_itemId`,`g_parameterName`),
KEY `g_pluginType_2` (`g_pluginType`,`g_pluginId`,`g_itemId`),
KEY `g_pluginType_3` (`g_pluginType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

i think it is the matter of utf-8 and the index length, i am sorry i do not any idea to fix it, would you please advise further? i am willing to test for it, thx!

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Wed, 2005-03-09 21:25
mindless wrote:
we now store utf8 data directly in the db instead of encoding it.. this is a huge space saving in the db...

glad to know this changed

for a little bit more information:
but as you known previous version of G2 encode the chinese or asian wordings but itself so the data in mysql is something like "& #36889 ;" etc. etc.

in this version (G2 beta, build 20030308), when my table in mysql encode as previous, ascii, and connection is utf-8, i could read chinese but i can search numbers or english only, chinese wordings cannot search.

and i tried to add new photo and name it in chinese, i can read wordings correctly but i cannot search for it also, in phpmyadmin, the chinese data shown as "???" instead of "& #36889 ;" etc.

hope this help.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-03-09 21:46

pluginType and pluginId should be size 32, not 128. this also changed recently.

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Wed, 2005-03-09 22:51

thx, after modified as your advise, i could import my data back to mysql, now both database (all tables) and connection are utf-8

when i search for chinese, no error occur, but no result return:

No results found for '倒數'

you may try to test my site: (copy some chinese text on my site, and try to search)
http://gallery.ecinfo.org
login: temp.test
password: 123456
debug mode enabled

thx

mindless wrote:
pluginType and pluginId should be size 32, not 128. this also changed recently.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-03-10 00:28

hm, i copied a character into my G2 and search did find it.. i have an older mysql, 4.0.23, and i don't see any of these collation settings in my 'show variables' output.. ?

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Thu, 2005-03-10 07:40

yes, mysql offical said that version 4.1.x support utf8, as i known, mysql 4.0.x does not support utf-8 (means no utf8 option in phpmyadmin), do you think this is the matter of mysql version version between 4.0.x and 4.1.x ?

mindless wrote:
hm, i copied a character into my G2 and search did find it.. i have an older mysql, 4.0.23, and i don't see any of these collation settings in my 'show variables' output.. ?

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Thu, 2005-03-10 18:13

maybe i have done some mistake, now i could input and search chinese in G2 beta (build 20050308), which MySQL both tables and collation in utf-8. thx very much G2 developer.

but a big problem is coming to me... previous version of G2 encode utf-8 by itself should chinese will be become something like "& #30333;". most of my chinese data is stored in mysql this style and caused it's failed to search out. the only solution i know is to edit and re-save each item via G2 to change something like "& #30333;" back to a normal chinese words in database.

i have ton of items in my gallery database now so it is crazy for me to edit and re-save each item via G2, do you have any suggestion to solve this problem? thx a lot!!!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-03-11 05:08

mactable, we changed the format of how we store data from entities "白" to actual UTF8 values but when we did so we didn't go back and convert all of your old data. I could swear that somebody else had this problem and wrote a script to fix it, but I did a forum search and can't find it. We provide a function for this conversion:

GalleryUtilities::unicodeEntitiesToUtf8

But somebody would need to write a script to trawl over all your entities, convert and resave them. Does anybody have such a script handy or is willing to write one?

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Fri, 2005-03-11 10:26

hello bharat, thx for your confirmation and clear my question.

since i am not a php expert so i do not have any idea how to code this script. i just hope if someone is willing to help.

thx very much again all G2 developers.

bharat wrote:
mactable, we changed the format of how we store data from entities "白" to actual UTF8 values but when we did so we didn't go back and convert all of your old data. I could swear that somebody else had this problem and wrote a script to fix it, but I did a forum search and can't find it. We provide a function for this conversion:

GalleryUtilities::unicodeEntitiesToUtf8

But somebody would need to write a script to trawl over all your entities, convert and resave them. Does anybody have such a script handy or is willing to write one?

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2005-03-13 21:53

I'll work on this, but you'll have to give me a couple days to figure G2 out :)

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Mon, 2005-03-14 08:40

great! great! great!
thx you very much alindeman

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Tue, 2005-03-15 03:17

Can you try out this script (please backup your data first though)?

Stick your G2 dir where it says and change the 0 to 1 in the define('ENABLE') (and change it back, or delete the file when you're done). Run it and it hopefully it will recursively convert everything. It may take a while on larger Galleries!

http://admlworld.com/~andrew/utfConvert.phps

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Tue, 2005-03-15 15:51

alindeman,

thx for your script, but error occured:

Working...

Error (ERROR_STORAGE_FAILURE)
in D:\sites\pix\www\gallery2\modules\core\classes\GalleryStorage\DatabaseStorage.class at line 1132 (gallerystatus::error)
in D:\sites\pix\www\gallery2\modules\core\classes\GalleryStorage.class at line 220 (mysqldatabasestorage::search)
in D:\sites\pix\www\gallery2\modules\core\classes\Gallery.class at line 189 (gallerystorage::search)
in D:\sites\pix\www\gallery2\modules\core\classes\helpers\GalleryChildEntityHelper_simple.class at line 412 (gallery::search)
in D:\sites\pix\www\gallery2\modules\core\classes\helpers\GalleryChildEntityHelper_simple.class at line 189 (gallerychildentityhelper_simple::_fetchchilditemids)
in D:\sites\pix\www\gallery2\modules\core\classes\GalleryCoreApi.class at line 2111 (gallerychildentityhelper_simple::fetchchilditemids)
in D:\sites\pix\www\gallery2\utfConvert.php at line 137 (gallerycoreapi::fetchchilditemids)
in D:\sites\pix\www\gallery2\utfConvert.php at line 72
in D:\sites\pix\www\gallery2\utfConvert.php at line 41

but i just think the above may not help you enough.

so FYI, i tried to run this script from my windows box console, some other error information shown on console:

PHP Notice: Undefined variable:
path in D:\sites\pix\www\gallery2\modules\core\classes\GalleryUrlGenerator.class on line 255
PHP Warning: parse_url(http:///): Unable to parse url in D:\sites\pix\www\gallery2\modules\core\classes\GalleryUrlGenerator.class on line 314
File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2)
Character set '#33' is not a compiled character set and is not specified in the 'c:\mysql\share\charsets\Index' file

thx for further help.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-15 16:09

mactable, upgrade to a current nightly build and you'll get that file.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-15 18:32

mactable, turn on buffered debug output to see what the exact database error is..

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Tue, 2005-03-15 22:05

sorry for my stupid, i have just known before i run this script, i need to login in to G2.

however, after this script finish and output:

Working...

All entities converted successfully!

i got nothing change in my database, my chinese wordings are still something like "& #26410;", which furthermore information should i give to you? please advise, thx a lot!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-15 22:37

alindeman, you need to commit the transaction when done.. search for "commit" in main.php to see how this is done.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Wed, 2005-03-16 04:06

Yikes! Sorry about that :) Thanks mindless for the tip.

mactable, this is my first Gallery 2 project, so bear with me :)

I've updated the file (same URL, bumped the version to 0.0.2). See if that works!

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Wed, 2005-03-16 06:38

alindeman,

thx i am very happy you are helping me.

after i have tried your script (version 0.0.2), result as same as last version, script said "All entities converted successfully!", but nothing change in database.

i have no idea which further information should give you, but one thing, there was around 10000 recrods in my "g2_item" table, and around 3000 records have chinese words, your script on my machine just run around 10 secs to finish, is it normal? my machine is Celeron 2G + ram 256MB.

thx a lot!

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Sat, 2005-03-19 05:17

could some one give me a help?
thx a lot!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-03-19 22:20

alindeman is still working on this... stay tuned.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2005-03-20 16:37

OK, here's another version, 0.0.3: bharat helped me test this, so hopefully it should work!

http://www.admlworld.com/~andrew/utfConvert.phps
http://www.admlworld.com/~andrew/utfConvert.txt

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-03-20 17:07

out of curiosity, did you change anything other than committing after every item?

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Fri, 2005-03-25 03:40

alindeman,

firstly, i am sorry i was out of country in previous days and just back to here, and thx very much for your new version 0.0.3 of utfconvert.php

after i tried version 0.0.3 script, this time, the output statement changes to:
"Converting item XXXXX" ... and finally, it shows "All entities converted successfully!"

but it seems that this version of script does not make any change to my database --- all the data remains unchange as same as previous version.

alindeman, if you need any furthermore information, please let me know and i will give you all. thx very much.

 
c4actbe
c4actbe's picture

Joined: 2004-09-01
Posts: 83
Posted: Thu, 2005-04-07 09:29

i lost ability to search:
Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1150 (gallerystatus::error)
in modules/core/classes/GalleryStorage.class at line 220 (mysqldatabasestorage::search)
in modules/core/classes/Gallery.class at line 206 (gallerystorage::search)
in modules/customfield/classes/CustomFieldSearch.class at line 132 (gallery::search)
in modules/search/SearchScan.inc at line 175 (customfieldsearch::search)
in modules/core/classes/GalleryView.class at line 239 (searchscanview::loadtemplate)
in main.php at line 293 (searchscanview::doloadtemplate)
in main.php at line 79
in main.php at line 70

Gallery version 2.0-beta-1+
PHP version 4.3.10 cgi
Webserver Apache/1.3.31 (Unix) DAV/1.0.3 mod_gzip/1.3.26.1a PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.6c
Database mysql 4.0.23a-log
Toolkits ImageMagick, SquareThumb, Gd, NetPBM
Operating system Linux dinar 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mon Feb 7 13:23:30 PST 2005 i686
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)

__________________
Gallery Debug Output
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc,
rb, 0)
fread(Resource id #27, 4096)
fread(Resource id #27, 4096)
fread(Resource id #27, 4096)
fclose(Resource id #27)
Unimplemented: GalleryUrlGenerator
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/sessions/df24d8611389d4f5ab47536ce066a656)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/sessions/df24d8611389d4f5ab47536ce066a656,
rb, 0)
feof(Resource id #31)
fread(Resource id #31, 4096)
feof(Resource id #31)
fread(Resource id #31, 4096)
feof(Resource id #31)
fclose(Resource id #31)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/core/0/0/0.inc)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/core/0/0/0.inc,
rb, 0)
fread(Resource id #34, 4096)
fclose(Resource id #34)
Branched navigation: x701f7784
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/core/module.inc)
realpath(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../..)
Binding text domain: modules_core ->
/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/locale
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data//versions.dat)
file(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data//versions.dat,
)
[1112865668] can't guarantee 5 -- extending!
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/entity/0/0/6.inc)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/entity/0/0/6.inc,
rb, 0)
fread(Resource id #39, 4096)
fclose(Resource id #39)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/search/module.inc)
realpath(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../..)
Binding text domain: modules_search ->
/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/search/locale
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc,
rb, 0)
fread(Resource id #46, 4096)
fread(Resource id #46, 4096)
fread(Resource id #46, 4096)
fclose(Resource id #46)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../../modules/search/SearchScan.inc)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../../modules/search/SearchScan.inc)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/core/classes/GalleryCoreSearch.class)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/customfield/classes/CustomFieldSearch.class)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/customfield/module.inc)
realpath(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../..)
Binding text domain: modules_customfield ->
/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/customfield/locale
--------------------------------------------------------------------------------
(mysql):
SELECT
111_Group.111_id,
111_Group.111_groupName
FROM
111_UserGroupMap, 111_Group
WHERE
111_Group.111_id = 111_UserGroupMap.111_groupId
AND
111_UserGroupMap.111_userId = 6
ORDER BY
111_Group.111_groupName
LIMIT 18446744073709551615
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql):
SELECT
111_PermissionSetMap.111_module,
111_PermissionSetMap.111_permission,
111_PermissionSetMap.111_description,
111_PermissionSetMap.111_bits,
111_PermissionSetMap.111_flags
FROM
111_PermissionSetMap

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql):
SELECT DISTINCT
111_AccessMap.111_accessListId
FROM
111_AccessMap
WHERE
(111_AccessMap.111_userId = 6
OR
111_AccessMap.111_groupId IN (2, 4, 3))
AND
111_AccessMap.111_permission & 1 = 1

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql):
SELECT
COUNT(111_Item.111_id)
FROM
111_Item, 111_AccessSubscriberMap
WHERE
(111_Item.111_description LIKE '%wow%' OR 111_Item.111_keywords
LIKE '%wow%' OR 111_Item.111_summary LIKE '%wow%' OR 111_Item.111_title
LIKE '%wow%')
AND
111_Item.111_id = 111_AccessSubscriberMap.111_itemId
AND
111_AccessSubscriberMap.111_accessListId IN (8, 9, 16, 18, 20,
41, 43, 45, 101)

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql):
SELECT
111_Item.111_id,
111_User.111_fullName,
111_User.111_userName,
111_Entity.111_modificationTimestamp, 111_Item.111_description,
111_Item.111_keywords, 111_Item.111_summary, 111_Item.111_title
FROM
111_Item, 111_AccessSubscriberMap, 111_Entity, 111_User
WHERE
(111_Item.111_description LIKE '%wow%' OR 111_Item.111_keywords
LIKE '%wow%' OR 111_Item.111_summary LIKE '%wow%' OR 111_Item.111_title
LIKE '%wow%')
AND
111_Item.111_id = 111_AccessSubscriberMap.111_itemId
AND
111_Item.111_id = 111_Entity.111_id
AND
111_User.111_id = 111_Item.111_ownerId
AND
111_AccessSubscriberMap.111_accessListId IN (8, 9, 16, 18, 20,
41, 43, 45, 101)
ORDER BY
111_Entity.111_modificationTimestamp DESC, 111_Item.111_id DESC
LIMIT 3
--------------------------------------------------------------------------------

mysql error: [1146: Table 'danielphoto.111_PermissionMap' doesn't exist] in
EXECUTE("
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
111_CustomFieldMap, 111_PermissionMap
WHERE
111_CustomFieldMap.111_itemId = 111_PermissionMap.111_itemId
AND
(111_PermissionMap.111_userId = 6
OR
111_PermissionMap.111_groupId IN (2,4,3))
AND
111_CustomFieldMap.111_value LIKE '%wow%'
AND
111_PermissionMap.111_permission & 1 = 1")

--------------------------------------------------------------------------------
(mysql):
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
111_CustomFieldMap, 111_PermissionMap
WHERE
111_CustomFieldMap.111_itemId = 111_PermissionMap.111_itemId
AND
(111_PermissionMap.111_userId = 6
OR
111_PermissionMap.111_groupId IN (2, 4, 3))
AND
111_CustomFieldMap.111_value LIKE '%wow%'
AND
111_PermissionMap.111_permission & 1 = 1
--------------------------------------------------------------------------------
1146: Table 'danielphoto.111_PermissionMap' doesn't exist

adodb_mysql._execute(
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
...) % line 818, file: adodb.inc.php
adodb_mysql.execute(
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
..., Array[7]) % line 1142, file: DatabaseStorage.class
mysqldatabasestorage.search(
SELECT
COUNT(DISTINCT [CustomFieldMap::itemId])
FROM
[C..., Array[7], Array[0]) % line
220, file: GalleryStorage.class
gallerystorage.search(
SELECT
COUNT(DISTINCT [CustomFieldMap::itemId])
FROM
[C..., Array[7], Array[0]) % line
206, file: Gallery.class
gallery.search(
SELECT
COUNT(DISTINCT [CustomFieldMap::itemId])
FROM
[C..., Array[7]) % line 132, file:
CustomFieldSearch.class

--------------------------------------------------------------------------------
(mysql):
SELECT
111_UserGroupMap.111_userId
FROM
111_UserGroupMap
WHERE
111_UserGroupMap.111_userId = 6
AND
111_UserGroupMap.111_groupId = '3'
LIMIT 1
--------------------------------------------------------------------------------

realpath(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../../)

Gallery Debug Output
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc,
rb, 0)
fread(Resource id #27, 4096)
fread(Resource id #27, 4096)
fread(Resource id #27, 4096)
fclose(Resource id #27)
Unimplemented: GalleryUrlGenerator
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/sessions/df24d8611389d4f5ab47536ce066a656)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/sessions/df24d8611389d4f5ab47536ce066a656,
rb, 0)
feof(Resource id #31)
fread(Resource id #31, 4096)
feof(Resource id #31)
fread(Resource id #31, 4096)
feof(Resource id #31)
fclose(Resource id #31)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/core/0/0/0.inc)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/core/0/0/0.inc,
rb, 0)
fread(Resource id #34, 4096)
fclose(Resource id #34)
Branched navigation: x701f7784
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/core/module.inc)
realpath(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../..)
Binding text domain: modules_core ->
/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/locale
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data//versions.dat)
file(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data//versions.dat,
)
[1112865668] can't guarantee 5 -- extending!
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/entity/0/0/6.inc)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/entity/0/0/6.inc,
rb, 0)
fread(Resource id #39, 4096)
fclose(Resource id #39)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/search/module.inc)
realpath(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../..)
Binding text domain: modules_search ->
/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/search/locale
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
fopen(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc,
rb, 0)
fread(Resource id #46, 4096)
fread(Resource id #46, 4096)
fread(Resource id #46, 4096)
fclose(Resource id #46)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../../modules/search/SearchScan.inc)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../../modules/search/SearchScan.inc)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/core/classes/GalleryCoreSearch.class)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/customfield/classes/CustomFieldSearch.class)
file_exists(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/helpers/../../../../modules/customfield/module.inc)
realpath(/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/core/classes/../../..)
Binding text domain: modules_customfield ->
/home/.quiet/dotscripting/bestlayout.com/daniel/gallery/modules/customfield/locale
--------------------------------------------------------------------------------
(mysql):
SELECT
111_Group.111_id,
111_Group.111_groupName
FROM
111_UserGroupMap, 111_Group
WHERE
111_Group.111_id = 111_UserGroupMap.111_groupId
AND
111_UserGroupMap.111_userId = 6
ORDER BY
111_Group.111_groupName
LIMIT 18446744073709551615
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql):
SELECT
111_PermissionSetMap.111_module,
111_PermissionSetMap.111_permission,
111_PermissionSetMap.111_description,
111_PermissionSetMap.111_bits,
111_PermissionSetMap.111_flags
FROM
111_PermissionSetMap

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql):
SELECT DISTINCT
111_AccessMap.111_accessListId
FROM
111_AccessMap
WHERE
(111_AccessMap.111_userId = 6
OR
111_AccessMap.111_groupId IN (2, 4, 3))
AND
111_AccessMap.111_permission & 1 = 1

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql):
SELECT
COUNT(111_Item.111_id)
FROM
111_Item, 111_AccessSubscriberMap
WHERE
(111_Item.111_description LIKE '%wow%' OR 111_Item.111_keywords
LIKE '%wow%' OR 111_Item.111_summary LIKE '%wow%' OR 111_Item.111_title
LIKE '%wow%')
AND
111_Item.111_id = 111_AccessSubscriberMap.111_itemId
AND
111_AccessSubscriberMap.111_accessListId IN (8, 9, 16, 18, 20,
41, 43, 45, 101)

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql):
SELECT
111_Item.111_id,
111_User.111_fullName,
111_User.111_userName,
111_Entity.111_modificationTimestamp, 111_Item.111_description,
111_Item.111_keywords, 111_Item.111_summary, 111_Item.111_title
FROM
111_Item, 111_AccessSubscriberMap, 111_Entity, 111_User
WHERE
(111_Item.111_description LIKE '%wow%' OR 111_Item.111_keywords
LIKE '%wow%' OR 111_Item.111_summary LIKE '%wow%' OR 111_Item.111_title
LIKE '%wow%')
AND
111_Item.111_id = 111_AccessSubscriberMap.111_itemId
AND
111_Item.111_id = 111_Entity.111_id
AND
111_User.111_id = 111_Item.111_ownerId
AND
111_AccessSubscriberMap.111_accessListId IN (8, 9, 16, 18, 20,
41, 43, 45, 101)
ORDER BY
111_Entity.111_modificationTimestamp DESC, 111_Item.111_id DESC
LIMIT 3
--------------------------------------------------------------------------------

mysql error: [1146: Table 'danielphoto.111_PermissionMap' doesn't exist] in
EXECUTE("
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
111_CustomFieldMap, 111_PermissionMap
WHERE
111_CustomFieldMap.111_itemId = 111_PermissionMap.111_itemId
AND
(111_PermissionMap.111_userId = 6
OR
111_PermissionMap.111_groupId IN (2,4,3))
AND
111_CustomFieldMap.111_value LIKE '%wow%'
AND
111_PermissionMap.111_permission & 1 = 1")

--------------------------------------------------------------------------------
(mysql):
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
111_CustomFieldMap, 111_PermissionMap
WHERE
111_CustomFieldMap.111_itemId = 111_PermissionMap.111_itemId
AND
(111_PermissionMap.111_userId = 6
OR
111_PermissionMap.111_groupId IN (2, 4, 3))
AND
111_CustomFieldMap.111_value LIKE '%wow%'
AND
111_PermissionMap.111_permission & 1 = 1
--------------------------------------------------------------------------------
1146: Table 'danielphoto.111_PermissionMap' doesn't exist

adodb_mysql._execute(
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
...) % line 818, file: adodb.inc.php
adodb_mysql.execute(
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
..., Array[7]) % line 1142, file: DatabaseStorage.class
mysqldatabasestorage.search(
SELECT
COUNT(DISTINCT [CustomFieldMap::itemId])
FROM
[C..., Array[7], Array[0]) % line
220, file: GalleryStorage.class
gallerystorage.search(
SELECT
COUNT(DISTINCT [CustomFieldMap::itemId])
FROM
[C..., Array[7], Array[0]) % line
206, file: Gallery.class
gallery.search(
SELECT
COUNT(DISTINCT [CustomFieldMap::itemId])
FROM
[C..., Array[7]) % line 132, file:
CustomFieldSearch.class

--------------------------------------------------------------------------------
(mysql):
SELECT
111_UserGroupMap.111_userId
FROM
111_UserGroupMap
WHERE
111_UserGroupMap.111_userId = 6
AND
111_UserGroupMap.111_groupId = '3'
LIMIT 1
-

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-04-07 09:50

part of the debug info that is interesting...

mysql error: [1146: Table 'danielphoto.111_PermissionMap' doesn't exist] in
EXECUTE("
SELECT
COUNT(DISTINCT 111_CustomFieldMap.111_itemId)
FROM
111_CustomFieldMap, 111_PermissionMap
WHERE
111_CustomFieldMap.111_itemId = 111_PermissionMap.111_itemId
AND
(111_PermissionMap.111_userId = 6
OR
111_PermissionMap.111_groupId IN (2,4,3))
AND
111_CustomFieldMap.111_value LIKE '%wow%'
AND
111_PermissionMap.111_permission & 1 = 1") 

ACL queries and permissionmap queries in a single G2 version? something's wrong.
Just did a grep on PermissionMap and it's all over G2.
In my G2, i only have the table g2_PermissionSetMap. PermissionMap doesn't exist.

?

 
ziddey

Joined: 2004-11-01
Posts: 52
Posted: Thu, 2005-04-07 19:19

worked like a charm thanks!!!

 
c4actbe
c4actbe's picture

Joined: 2004-09-01
Posts: 83
Posted: Thu, 2005-04-07 22:29

worked what? i looked at my db and i have PermissionSetMap. Does it mean i have to rename something inside files? i would appreciate any guidance.
thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-04-08 01:15

maybe ziddey is referring to what this topic is about.. your post isn't really related except that search is involved.

 
c4actbe
c4actbe's picture

Joined: 2004-09-01
Posts: 83
Posted: Fri, 2005-04-08 05:17

oh really? everything else seems to be working just fine...

 
ziddey

Joined: 2004-11-01
Posts: 52
Posted: Fri, 2005-04-08 05:18
c4actbe wrote:
oh really? everything else seems to me working just fine...

??? where did you come from???

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Tue, 2005-04-12 06:03

alindeman,

excuse me, are u still here?
your utfConvert.php version 0.0.3 does not work. would you please give me a help? thx a lot!

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Fri, 2005-04-15 19:31

Sure, I'm still around. This week has been hectic for me, but I may have some weekend time! :)

 
mactable

Joined: 2005-01-24
Posts: 34
Posted: Sat, 2009-01-17 05:19

alindeman,

thx a lot! i look forward to your further help,
if you need any information, please leave me message here.

thx again.