I cannot reproduce the bug. Any help will be appreciated.
Offline
nicolas wrote:
I cannot reproduce the bug. Any help will be appreciated.
Dear nicolas,
my Piwigo installation is behind a htpasswd blockade as it is run for internal purposes only and users should only be allowed to access it when they have authenticated themselves via the server.
Could the problem I described be related to my setup? Maybe the web-api call is blocked somehow.
Which file is accessed for retrieving the data? $PIWIGO_ROOT_DIR/ws.php? I could unblock this single file, if this would help. (Did so already for the uploadify swf due to a related problem).
Do you know how I can debug this? Is there a way to "unpack" the javascript code?
Thanks in advance.
Yes you can try to unblock ws.php as ajax requests are made through ws.php.
Offline
Dear nicolas,
I solved the problem, but blocking ws.php was not the problem (which I really found unlikely as the AJAX request is done by the browser that previously authenticated with the server).
I noticed that the query script passes the typed in data lower-case and that the result was empty. When I hacked it that the query was as I typed it in (full case) I got valid results.
Then I dug deeper an noticed that the row "name" of the table "piwigo_tags" was set to the collate "utf8_bin", which enforces a binary string comparison according to the MySQL documentation.
I altered the table definition so that "name" is now set to collation "utf8_general_ci". And voila, the string comparison is done case-insensitive and I get valid results.
Thanks for your help and quick response.
sakanaou wrote:
Dear nicolas,
I solved the problem, but blocking ws.php was not the problem (which I really found unlikely as the AJAX request is done by the browser that previously authenticated with the server).
I noticed that the query script passes the typed in data lower-case and that the result was empty. When I hacked it that the query was as I typed it in (full case) I got valid results.
Then I dug deeper an noticed that the row "name" of the table "piwigo_tags" was set to the collate "utf8_bin", which enforces a binary string comparison according to the MySQL documentation.
I altered the table definition so that "name" is now set to collation "utf8_general_ci". And voila, the string comparison is done case-insensitive and I get valid results.
Thanks for your help and quick response.
I can add an option in admin to make search case-insensitive.
Offline
On the admin page I noticed a question mark. When clicked I get a popup:
-----
Piwigo encountered a non recoverable error
_data//plugins/ no write access
#1 mkgetdir /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags/include/t4u_config.class.php(32)
#2 t4u_Config::__construct /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags/include/t4u_config.class.php(43)
#3 t4u_Config::getInstance /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags/init.php(31)
#4 include_once /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags/main.inc.php(35)
#5 include_once /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/include/functions_plugins.inc.php(236)
#6 load_plugin /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/include/functions_plugins.inc.php(250)
#7 load_plugins /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/include/common.inc.php(137)
#8 include_once /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/admin/popuphelp.php(31)
-----
The _data/plugins is 777.
I notice a double slach in the path: _data//plugins/ ? My bad, or your typo?
Is this the reason I see no "add tags" on the picture pages ?
***
edit
***
I dug deep, and found in /include/t4u_config.class.php on line 64
private function get_config_file_dir() { return $GLOBALS['conf']['data_location'].'/plugins/'; }
Can I safely remove the / in front of the plugins ? Or will I start shutdown of the internets than?
Last edited by novw (2013-01-14 15:12:08)
Offline
I had the samebug recently, I didn't search further more
I think you are right, the issue came from this slash, try remove it
Offline
but but but I might end the world ;)
Nope. "New" error:
Piwigo encountered a non recoverable error _data/plugins/ no write access #1 mkgetdir /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags/include/t4u_config.class.php(32) #2 t4u_Config::__construct /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags/include/t4u_config.class.php(43) #3 t4u_Config::getInstance /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags/init.php(31) #4 include_once /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags/main.inc.php(35) #5 include_once /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/include/functions_plugins.inc.php(236) #6 load_plugin /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/include/functions_plugins.inc.php(250) #7 load_plugins /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/include/common.inc.php(137) #8 include_once /home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/admin/popuphelp.php(31)
The path is correct now at least. Could this be related to the server hickups (safe mode) I have been having?
Offline
strange
I use folders in "_data" in my own plugins, no problem (right ?), perhaps the way its done in User Tags is buggy
Offline
The problem is not the slash. You can add as many slash as you want it will work.
Your problem is that your server has no write access for _data/plugins/ directory.
Offline
As far as I know there is a difference between _data//plugins/ and _data/plugins/ ?
Anyway.
_data/plugins/ has 777. So do the two (!) files that reside inside: index.htm and user_tags.dat
user_tags.dat:
a:4:{s:10:"plugin_dir";s:77:"/home/kerstdorp/domains/kerstdorpen.nl/public_html/catalog3/plugins/user_tags";s:11:"plugin_name";s:9:"User Tags";s:21:"t4u_permission_update";N;s:11:"permissions";a:2:{s:3:"add";s:5:"guest";s:6:"delete";s:9:"webmaster";}}
The plugin is doing something. However. Where is the location where the user can add tags? I seem unable to locate an option "add tags" or something? I have set who can add tags to "guest" and who can delete to "webmaster"
Offline
the plugin does not work correctly if launched by a script outside the root piwigo directory (popuphelp is inside admin)
the data_location is defined as a relative path to the piwigo root directory
so if a plugin needs
- a file system path it should use PHPWG_ROOT_PATH.$conf['data_location']
- an url it should use get_root_url().$conf['data_location']
Offline
I have just run into an issue with running User Tags and Jplayer plugins together. If I enable User Tags, Jplayer will not play audio or video files - the player does not seem to load.
@Quack : I'm sorry but I don't know how to reproduce your problem. Can you help me adding video (in flv format for example) and playing them with jPlayer. I'm sure I missed something but don't know what.
Offline