![]() |
|
Problems with Lightroom plug-in - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Problems with Lightroom plug-in (/thread-9659.html) |
Problems with Lightroom plug-in - misterteddy - 2012-02-18 I'm not sure if it's the right place to put this post but I'd just give it a try. I've installed Zenphoto Lightroom plugin and could login to the site last month from the plugin last month. However, I cannot login to the site from the plugin now after updating the Zenphoto to version 1.4.2. The lightroom plugin shows this message: Error log from my zen photo site shows this: [18-Feb-2012 00:56:16] PHP Fatal error: Call to protected method Zenphoto_Authority::checkLogon() from context '' in /home/mist/public_html/zenphoto/zp-lightroom/xmlrpc.php on line 135 Does anyone know how can I solve the problem? Thanks in advance! Problems with Lightroom plug-in - acrylian - 2012-02-18 Sure it is the right place. I cannot help though. Hopefully the plugin's developer still visits this forum. Problems with Lightroom plug-in - sbillard - 2012-02-18 The problem occurs with our move to PHP5 and proper use of objects. The But how this is fixed would depend on what the plugin is doing, which I have not investigated. Problems with Lightroom plug-in - jasonized - 2012-03-25 Okay, if you're not allowed to call checkLogon from outside, exactly how is it supposed to be used? Here is the code doing the checking.. it's being called by a zp_authority instance, so in theory it should work, right? But we still get the "protected method" error... Thanks, /**
if ($_zp_authority->checkLogon($args['loginUsername'], $args['loginPassword'], true)) Problems with Lightroom plug-in - sbillard - 2012-03-25 Well, it is used exactly as Zenphoto uses it of course. Problems with Lightroom plug-in - jasonized - 2012-03-25 Good to see a cry for help is taken so seriously... Ah well, I suppose the easiest answer is just remove the 'protected' attribute... see if that works. Because it looks to me (granting I'm not a PHP programmer) that it is being used the same way... Sigh. Problems with Lightroom plug-in - sbillard - 2012-03-25 You can check if a user is logged in by testing If there is no user logged in (or the user has insufficient rights) and you wish him to log in then you would like to present a login for you use the template fuction Problems with Lightroom plug-in - sbillard - 2012-03-25 Well, of course you have never actually asked for help on what you want to do. Just for using a protected method of an object. Protected methods CANNOT be referenced anywhere except within the object that declares them or within objects that are decendents. The reason for protected methods is that the designer does not intend their functionality to be generally available. There are many reasons for that, but the bottom line is the same--that function CANNOT be used outside of the object. You can, of course remove the protected attribute. Zenphoto is after all open source. But you do so at your own risk and peril. We do not proport to keep functionality of protected methods constant throughout the evolution of Zenphoto--one of the reason for making them protect in the first place. Problems with Lightroom plug-in - jasonized - 2012-03-25 Hmm... I suppose in the absolute terms I did not, in fact, ask for explicit help. I just continued the help request from the previous person.. Sorry, my mistake. To make it explicit then, seeing the code that I posted first, what would be the correct way to actually use the zen photo login checking in a plugin? The actual plugin developer has decided he has too much to do, and so put the source in the public domain. I'm just trying to get my site working again, since otherwise I'll have to find another solution (when I had a nice one already working, until I upgraded). Thanks, Problems with Lightroom plug-in - jasonized - 2012-03-25 Hmm.. Okay, I'll browse through to find out what should be. See if I can get anything working. :} Thanks! Problems with Lightroom plug-in - sbillard - 2012-03-25 I took pity on you and downloaded the plugin. The changes you need to do to make it "functional" are:
} BUT, be aware that all this does is tell you if the user/password are valid. It does not tell you anything about what the user might be allowed to do. There appears to be no code to check if the user should even be allowed to use this facility, much less if he can perform any specific action on any particular album. In short, no Zenphoto security seems to be applied. Problems with Lightroom plug-in - jasonized - 2012-03-25 Wow! Thank you! By a strange quirk of fate, I just tried commenting the check out.. it "lets me" login, which gets the first part working.. obviously I have to actually have the user/pass properly to do anything. Here's the strange part... I can create albums, and upload images.. but can't delete or update images, and can't delete albums. I guess I'll have to either learn LUA or hopefully the person who took over the plugin will do something with it. Thank you, I'll put your code in and see if it (hopefully) makes a difference! Cheers! Problems with Lightroom plug-in - jasonized - 2012-03-25 Great! Tried out your code, and it does validate properly now (i.e., I give it junk, I get an error. Good, get passed). Thank you for your help, that's a great start at getting it functional again. Now, to find someone who knows LUA to fix delete.. Cheers! Problems with Lightroom plug-in - jphilbert - 2012-06-20 I am a lua programmer (kinda) and if there is enough interest I will take over the plugin development. First things I will do is add debug code and some other needed stuff then get on bugs and enhancements... Problems with Lightroom plug-in - sbillard - 2012-06-21 Good to hear. Please ask if you have questions on how Zenphoto works. Note that there are debug logging functions that may help you. Problems with Lightroom plug-in - acrylian - 2012-06-21 That's always very welcome. If you haven't please read here, too: Problems with Lightroom plug-in - jasonized - 2012-06-21 It would be good to have a developer actually working on it... I haven't had any time to learn lua, so am useless at this point. So yes, if you'd like to take it over, please do! |