Announcement

#46 2012-12-08 13:04:34

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Plugin User Tags

I cannot reproduce the bug. Any help will be appreciated.

Offline

 

#47 2012-12-12 13:27:02

sakanaou
Guest

Re: Plugin User Tags

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.

 

#48 2012-12-12 14:28:28

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Plugin User Tags

Yes you can try to unblock ws.php as ajax requests are made through ws.php.

Offline

 

#49 2012-12-13 14:00:15

sakanaou
Guest

Re: Plugin User Tags

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.

 

#50 2012-12-13 14:13:02

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Plugin User Tags

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

 

#51 2013-01-14 15:04:24

novw
Member
2013-01-06
74

Re: Plugin User Tags

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


Code:

  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

 

#52 2013-01-14 15:17:42

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Plugin User Tags

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

 

#53 2013-01-14 15:25:24

novw
Member
2013-01-06
74

Re: Plugin User Tags

but but but I might end the world ;)

Nope. "New" error:

Code:

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

 

#54 2013-01-14 15:32:47

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Plugin User Tags

strange

I use folders in "_data" in my own plugins, no problem (right ?), perhaps the way its done in User Tags is buggy

Offline

 

#55 2013-01-14 15:45:47

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Plugin User Tags

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

 

#56 2013-01-14 16:18:50

novw
Member
2013-01-06
74

Re: Plugin User Tags

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:

Code:

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

 

#57 2013-01-14 20:27:38

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Plugin User Tags

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

 

#58 2013-01-18 20:29:06

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Plugin User Tags

I fixed issue with path in admin help pages with release 0.7.2

Offline

 

#59 2013-02-10 12:34:10

Quack
Guest

Re: Plugin User Tags

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.

 

#60 2013-02-11 18:34:42

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Plugin User Tags

@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

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact