[imageareas] 0.2.0 Alpha Release!

phinze

Joined: 2008-03-30
Posts: 40
Posted: Sun, 2008-08-10 03:42

Hello again friends,

It's time for another alpha release of the ImageAreas module. It now interacts with other modules for the storage of data. It now uses the tags module and the comments module in the back end. You can check out the Site Admin page to see which versions are supported and whether or not they are being detected.

If you're using an old version of ImageAreas, please uninstall it before trying out this version.

Using this module, you should be able to add both tags and comments to areas of images. Give it a shot and post back here with your results! Just extract the attached file into your favorite Gallery2 testing installation and have fun!

Releases can be found here: http://projects.phinze.com/imageareas/releases/

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Mon, 2008-08-11 21:29

Hi, I've just installed this to play with it (I have not used a previous version) and wanted to give my experiences with it. I'm running on a Gallery 2.2 installation.

I downloaded the tarball and unpacked it in gallery2/modules. I went to the Site Admin / plugins page sure enough it's listed there as 0.2.0 alpha. I hit the "install" button and the line turned green, but nothing else happened. I hit the install button again and this time got an error about a duplicate preference or permissions entry (sorry, didn't capture the error text). OK whatever, it not says it's installed and I'm willing to believe the previous thing was just a browser hiccough.

I browse to the ImageAreas configuration stuff and I see:

DataType Description Required Plugin Required Version Interface Active?
Comment Add a comment comment 1.1.12 No
Comment Add a comment comment 1.1.3.2 Yes!
Tag Tag a Person/Item tags 1.3.6 Yes!

It seems odd that versions of 'Comment' are listed as required - I indeed have 1.1.3.2, do I need a newer version? I don't see anything on the wiki page or the previous thread about a required version for the module.

Forging ahead, I browser to a picture and chose "Edit Area" from the menu on the left. Oops, I got this:

ImageAreas Module Error
Oh no!

Something bad happened with the JavaScript in the link you just clicked, which caused the browser to fall through to this link. This could mean any one of several problems:
...(assume there's no reason to post the rest)

I backed up and tried to hit "Add ImageArea" but that leads to the same problem, as does "Show/Hide ImageAreas". There are no errors in my Apache log files as far as I can tell.

I noticed that there was mention somewhere about adding the ImageBlocks to the theme support so I went back to the Admin Settings and indeed there was a block available for ImageAreas, so I added that to "Blocks to Show on Photo Pages".

This looks promising - on reload, the icons for "Add ImageArea" etc have changed from the generic Gallery icons to what appear to be custom ones. The "Edit" button does nothing - I guess I should use "Add"? I hit add and lo and behold a comment box pops up for me. Unfortunately, while I can click to edit the text for the comment box, or click to move/resize the area, the click *also* seems to flow through to the web page beneath which causes the page to reload with the full size picture.

Also, "Show/Hide Imageareas" now causes an error message that says "An error occured, and the Imageareas module was not properly loaded". Clicking it again either leads to nothing or a return to the "Oh no!" error page. Presumably this button would work better if I was able to define some areas...

Any ideas? I'm using Firefox 3 (well actually Debian Iceweasel 3) on Linux against Gallery 2.2 running on Apache 2 with php 5. I'm happy to provide more information or try debugging, as time allows.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-08-12 01:41
Quote:
I'm running on a Gallery 2.2 installation.

I guess the module should check for older versions of gallery that it might have not been tested against.
FYI G2.2 has security issues and you should upgrade regardless of these issues.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-08-12 12:11

Working more smoothly now, and looking good. Here are the results of the big-flat-stompy-boots jury:

  • I'm still getting the Syntax Error on page load (see screenshot) - that's G2.3RC1, FF3.
  • Delete option displays "Are you sure you want to delete this the following note?" for both comments and tags - what's a "the following note"?
  • Hitting "Delete ImageArea" before the Loading ImageAreas module..." message has cleared from the top right results in a "An error occured, and the ImageAreas module was not properly loaded" error
  • In fact hitting any of the imageArea action links before the Loading ImageAreas module..." message has cleared from the top right results in a "An error occured, and the ImageAreas module was not properly loaded" error
  • Inconsistent hover cursor: cross-hair over a tag area, arrow over a comment area
  • Uninstalling the comments module doesn't remove the comment image areas from the database, and (presumably) is the cause of a "An error occurred, and the ImageAreas module was not properly loaded. The error was: JSON.parse" error on the next load of a page which used to have an imageArea comment. Thereafter the imageAreas module refuses function for that image.
  • The same problem exists when the tags module is deactivated and a tagged imageArea is on a page - it screws the module with a JSON.parse error. In fact I haven't worked out if there's a difference between uninstalling the module, and deactivating it, in that respect. Reactivate the tags module makes it work fine. Obviously if I (only) deactivate tags or comments you can't delete the relevant IA map entries, as I can reactivate them. On the other hand you do need to delete them when the relevant tags/comments get wiped on uninstalling the tags or comments module(s).
  • I did get a few random JSON.parse errors while creating tags with duplicate tag names, but I haven't been able to reproduce the problem reliably. I'll keep looking

Hope that gives you something to work with.

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Tue, 2008-08-12 18:44
floridave wrote:
Quote:
I'm running on a Gallery 2.2 installation.

I guess the module should check for older versions of gallery that it might have not been tested against.

If it's not expected to work on pre-2.3, a note on the wiki might be reasonable - I didn't see anything definitive on the previous thread implying it wouldn't work. Happy to wait if that's the case.

Quote:
FYI G2.2 has security issues and you should upgrade regardless of these issues.

Well, I'm on 2.2.5, I just didn't bother to look up the full version string. I assume it's not required to move to beta software to stay up on security fixes...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-08-12 19:16
Quote:
Well, I'm on 2.2.5,

Well, that is a lot different than

Quote:
I'm running on a Gallery 2.2 installation.

I am sure phinze will look into some of your issues now that we have the correct version info.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Tue, 2008-08-12 23:05

cchiappa: Thanks for that great user report! Here are a couple of points of response:

  • I do think the installation hiccup was just a browser thing. If anyone else runs into trouble I'll look into it though.
  • The admin page I admit is a little confusing. It is meant to show the supported interfaces and which are active. I will work on making this page clearer.
  • The module should make it more obvious that you need to add the theme block before it will work. I thought I had appropriate error messages in place, but it seems I did not. I'm glad you figured it out, and I'll make sure that the errors are clear when they detect this particular problem. I'm also considering putting a check on the admin page to tell the user who might go there wondering what's wrong.
  • Once you got the interface working, your clicks should not have been passing through to the image. I have Javascript in place that should be removing the link from the image and placing it below as a text link. I will look into this problem further.

floridave & cchiappa: I am indeed testing on a Gallery 2.2.5 installation. This module should support that version as well as G2.3. I'll make a note of the versions I'm attempting to support on the wiki page.

alecmyers: Great bug reports as usual. I'm working through and fixing them.

Expect 0.2.1 soon (tonight maybe, tomorrow definitely) with the fixes suggested by alecmyers and cchiappa. Thanks everyone!

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Wed, 2008-08-13 00:41

I did a bit more testing and I can add areas fine with IE. However, if I mouse over them I don't get the right text, just a couple of red lines (picture attached). If I select Edit ImageAreas and click on the area I get the proper edit window. Even on an image with no ImageAreas, clicking on the image does not lead to the full size image - I assume this is by design given your comments above? Not a big deal but it might be nice to be able to have the old behavior (click through to full size image) as an option in the future.

Going back to Firefox, but this time on Windows, I can see the area I added with IE, but mousing over it leads to similar behavior (no text on the tag, just some red lines). Clicking on the picture again leads to the full size image. Similarly, clicking on "Edit ImageAreas" and clicking on the area brings up the proper edit dialog but also sets the browser to loading the full size image.

The only thing I can think of that's odd about my Firefox is that I run Noscript, but my gallery is of course set to allow all scripting.

Happy to try anything or give you an account on the gallery in question if you want to poke around.

Thanks for the work!

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Tue, 2008-08-19 19:10

ImageAreas 0.2.1 [alpha]

  • Vastly improved error message presentation using a modal dialog instead of javascript alerts (falls back to alerts if there is a problem).
  • Updated delete confirmation message.
  • Improved behavior before the module is fully loaded, will not show error messages.
  • Fixed small issue with inconsistent cursor on notes that were just added.
  • Added the notion of whether or not a given interface is "active", which is based on whether or not the module it depends on is active. Inactive image areas are hidden, while orphaned image areas--those that have had their data deleted out from under them--are deleted.
  • Improved handling of duplicate tags in the TagsAreaInterface

cchiappa: I've PMed you asking about a login to the Gallery2 you're using to test. I'd like to investigate what's happening with those red lines you speak of.

I'm out for the night. I will do more extensive testing on g2.2.5, g2.3-rc1, and g[SVN-HEAD] tomorrow.

Back in the morning for more imageareas fun!

Releases can be found here: http://projects.phinze.com/imageareas/releases/

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Wed, 2008-08-13 09:20

Hrmmm I've managed to hose my installation a bit it seems. I installed the 0.2.0 alpha from the tarball link provided. I figured I'd update to 0.2.1, so I shutdown Apache, moved the old imageareas directory out of the way, and checked the new one out of svn. Started Apache back up and went to Site Admin -> Plugins and just got a blank page - no errors, HTML or anything. No errors logged to the log file either. I tried shutting down Apache, restoring the old directory, and starting up again, but got the same thing. The rest of Gallery works OK, but the plugin page is dead and the ImageArea links are gone from the other pages. Logging out and logging back in doesn't help. Moving both directories out of the way leads to an error:

Error Detail -
Error (ERROR_BAD_PLUGIN) : Class imageareas.svnModule does not exist

* in modules/core/classes/helpers/GalleryPluginHelper_simple.class at line 102 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 209 (GalleryPluginHelper_simple::loadPlugin)
* in modules/core/SiteAdmin.inc at line 69 (GalleryCoreApi::loadPlugin)
* in modules/core/classes/GalleryView.class at line 300 (SiteAdminView::loadTemplate)
* in main.php at line 445 (GalleryView::doLoadTemplate)
* in main.php at line 94
* in main.php at line 83

Mentioning svn seems a bit odd, perhaps it's gotten confused somehow by the .svn directory? (I admittedly know nothing about php)

Any ideas?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-08-13 12:52

Hi Paul,

Going well. Here's the latest:

  • error4.png: reproducible if you uninstall comments in a different window then try to add a comment without having refreshed the page - I appreciate that you can't add a comment if they're not available any more, but a better error message would be desirable. If you uninstall tags, you get this message: "An error occurred, and your changes could not be saved. JSON syntax error" - which is a bit better.
  • error3.png: not sure how I generated this, but can you stop smarty errors showing up like that?
  • Imageareas don't move correctly if the image is rotated (they stay in the same place relative to the page) - I suspect that's on the 'future improvements' list, but I thought I'd mention it.
  • Whole module doesn't appear to be happy in Opera: falls through to the javascript error page (but who uses Opera anyway?)
  • Imageareas doesn't check for permission "[comment] add comments" before offering to add a comment - attempting to add a comment Image Area then fails with a permission denied error top right.
  • It also doesn't obey "[comment] view comments" before displaying them - naughty!
  • Naturally enough, editing a comment for which you don't have "[comment]edit comments" is offered, but fails with a permissions error top right.
  • Ditto checking for tags permissions - you don't: "An error occurred, and your changes could not be saved. Error (ERROR_PERMISSION_DENIED) : user id: 5 doesn't have permission: tags.edit for item id: 181 in C:\xampp\htdocs\modules\core\classes"
  • Editing a comment imagearea which was (after IA loaded) deleted by another user gives a missing error object message top right. Could be handled neater. For tags it's fine, the tag just gets recreated (presumably because tags are just map entries, not Entities?) Guess that's the same as error4.png above though.

I'll try to break it some more later.

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Thu, 2008-08-14 20:23

Hrmm, I just got a somewhat different error:

Error Detail -
Error (ERROR_BAD_PLUGIN) : Class imageareas.oldModule does not exist
* in modules/core/classes/helpers/GalleryPluginHelper_simple.class at line 102 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 209 (GalleryPluginHelper_simple::loadPlugin)
* in modules/core/SiteAdmin.inc at line 69 (GalleryCoreApi::loadPlugin)
* in modules/core/classes/GalleryView.class at line 300 (SiteAdminView::loadTemplate)

I don't think I've made any changes since getting the svnModule error...anyone have any ideas?

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Fri, 2008-08-15 15:54

Duh, figured out my problem. When I was trying to upgrade imageareas, I did this:

cd /usr/share/gallery2/modules
mv imageareas imageareas.old
svn co ... imageareas

So I ended up with gallery thinking I had two modules - imageareas and imageareas.old, but presumably with conflicting symbols and the like. Moving .old somewhere safer fixes things. Obvious in retrospect, but the error messages were a bit opaque.

So, I'm now on Imageareas 0.2.1, but the bugs related to click-through on Firefox and rendering the text as red lines still seem to be present.

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Fri, 2008-08-15 18:58

@cchiappa: Glad you solved The Mystery of the Old Plugin. ;) Thanks for the login to your site... using that I have been able to determine that my initialization JavaScript does not handle the Image Frames plugin well. I am working on a fix for that right now.

@alecmyers: Fixes for your recent stomps come after that.

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Tue, 2008-08-19 19:11

ImageAreas 0.2.2 [alpha]

  • Performed audit of all code in preparation for review.
  • Improved error handling for PHP errors and form validation errors.
  • Attempted to get things ready for internationalization. Still some TODOs left there.
  • Modified initialization JS to work with the ImageFrame module (thanks
    to cchiappa for the report!)
  • Dialog no longer shows up during module load--valiant was right: it gets
    annoying after awhile.
  • Interfaces now check for view permission before giving out data, which is,
    ahem, probably a good thing to do. :)
  • Friendlier permission denied messages.

Releases can be found here: http://projects.phinze.com/imageareas/releases/

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Fri, 2008-08-15 22:44

I just updated and things seem to be working well, thanks!

A few comments:
* I think it would be nice to have a mode where the (distracting) boxes didn't appear on the picture, but the tags would still appear on mouseover.

* On an image which has no ImageAreas, clicking Edit, Delete or Show/Hide seems to do nothing silently - some indication that there is nothing to do might be nice.

* I'm seeing some sort of permissions issue - I can add ImageAreas based on tags, but not on comments. I get a permissions error when I try to, even tho "Everybody" has permissions to Add Comments and Registered Users have "[imageareas] all access". Oddly enough, when I fail to add an ImageArea, the comment I was trying to add shows up as a regular comment. The Admin account can't do it either.

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Tue, 2008-08-19 19:12

ImageAreas 0.2.3 [alpha]

  • Fixed a bug in the new permission check in the comment interfaces.
  • New option in [ImageAreas Settings] --> "Show ImageAreas by Default"
  • Item links now change text based on their current status, making UI state clearer
  • Rewrote several error messages to make them clearer

Releases can be found here: http://projects.phinze.com/imageareas/releases/

 
tsfftf

Joined: 2007-02-02
Posts: 73
Posted: Sun, 2008-08-17 22:14

this module just isn't working with my gallery installation. i've upgraded the module to alpha 0.2.3 but its still coming up with the error page when i try to add and ImageArea. is it compatible with gallery 2.2.3? I know thats not the newest release - there's 2.2.5 out and even 2.3 RC1 - but there's not wholescale changes between 2.2.3 and 2.2.5 that would affect the modules performance is there?

is it something to do with my webserver? does this module not agree with XAMPP or something? any help would be great - everyone else seems to have this working/

here is my support information:

Gallery version = 2.2.3 core 1.2.0.5
PHP version = 5.2.5 apache2handler
Webserver = Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e PHP/5.2.5 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7
Database = mysqli 5.0.51, lock.system=flock
Toolkits = ArchiveUpload, Dcraw, Exif, Ffmpeg, Getid3, LinkItemToolkit, NetPBM, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux Knoppix 2.6.19 #7 SMP PREEMPT Sun Dec 17 22:01:07 CET 2006 i686
Default theme = *********
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Rows in GalleryAccessMap table = 38
Rows in GalleryAccessSubscriberMap table = 2531
Rows in GalleryUser table = 49
Rows in GalleryItem table = 2496
Rows in GalleryAlbumItem table = 101
Rows in GalleryCacheMap table = 0

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Tue, 2008-08-19 19:34

tsfftf: Sorry you've been having trouble. I've not done any testing on 2.2.3, but you are right that if it's working on 2.2.5 there probably aren't any differences that would cause problems. Is there any way you can set me up a login to the Gallery installation you're having problems with? That would be the quickest way to diagnose the error.

Also, can you make sure you're not having client-side problems by checking to see if everything at http://sandbox.phinze.com/imageareas/ works for you? (Registration is automatically approved.)

EDIT: I did find a bug in something I recently changed that would affect installations where the displayed image is not contained within a link. Bugfix release 0.2.3b is attached, and I'll change the file above.

Releases can be found here: http://projects.phinze.com/imageareas/releases/

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Mon, 2008-08-18 01:41

Phinze, As per my other problem of not having the right plugins. I checked the settings and it does not display what modules I am lacking:

nstalled Interfaces
DataType Description Supported Module Supported Version Module Installed? Module Active?

That is all it says.

What interfaces do I need to install?

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Mon, 2008-08-18 02:33
tlmothy wrote:
Phinze, As per my other problem of not having the right plugins. I checked the settings and it does not display what modules I am lacking

That's very odd. That should be listing interfaces that came with the module by just reading the files. Here is a list of the files that are interfaces... can you check to make sure these files exist?

./modules/imageareas/classes/CommentAreaInterface_1_1_12.class
./modules/imageareas/classes/CommentAreaInterface_1_1_3_2.class
./modules/imageareas/classes/TagAreaInterface_1_3_6.class

If they do exist, I wonder if some other error is getting thrown on the admin page. You can change display_errors to 1 in your config.php to see.

Let me know if either of these things helps you.

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Mon, 2008-08-18 03:12

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Here is my system info

Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.0.4 cgi-fcgi
Webserver = Apache
Database = mysql 5.0.27-standard, lock.system=flock
Toolkits = ArchiveUpload, Thumbnail, Getid3, LinkItemToolkit, SquareThumb, NetPBM, Exif
Acceleration = partial/900, partial/900
Operating system = Linux leaf.lumiere.net 2.6.12-2.6.12-1.1456_FC4-leaf #1 SMP Sat Dec 31 18:06:18 EST 2005 i686
Default theme = ice
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0
Rows in GalleryAccessMap table = 210
Rows in GalleryAccessSubscriberMap table = 11804
Rows in GalleryUser table = 20
Rows in GalleryItem table = 11796
Rows in GalleryAlbumItem table = 396
Rows in GalleryCacheMap table = 55647

I have these files yes.
./modules/imageareas/classes/CommentAreaInterface_1_1_12.class
./modules/imageareas/classes/CommentAreaInterface_1_1_3_2.class
./modules/imageareas/classes/TagAreaInterface_1_3_6.class

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Tue, 2008-08-19 19:35
tlmothy wrote:
Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/clock/public_html/gallerymania/modules/imageareas/classes/ImageAreasHelper.class on line 653

Hmm... odd that warning hasn't cropped up before. Anyways, I changed the regexp being used to match on that line, so lets see if this version works. (It's only got classes/ImageAreasHelper.class changed, but I figured easiest to just make another bugfix release).

Releases can be found here: http://projects.phinze.com/imageareas/releases/

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Mon, 2008-08-18 16:08

Thx I will check it out once I am back home!

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Mon, 2008-08-18 16:30

I just updated to the latest svn. The first thing I noticed, which probably existed before, is that the imagearea bookkeeping is off. I have a picture that I had previously tried (and failed) three times to add an imagearea comment to, and it thought it had 3 imageareas even though it has none. Now that the module is working for me, I can add an imagearea and it correctly sets the count to 1. A minor quirk, but worth noting.

I guess imagearea comments also show up as regular comments? At least the one I just added shows up as a regular comment with no indication it's tied to an imagearea. It's a little bit disconcerting since adding the imagearea doesn't trigger a page reload - so you add the area and you can see it on the picture, but the comment below the picture doesn't appear until you force a reload.

Something else I find a little quirky is that when you first go to a page, you can see the imageareas but the link on the left still says "Show/Hide imageareas." When you click it, it starts toggling between "Show" and "Hide" and never goes back to "Show/Hide". If the default when you enter a picture is to show them, I think the link should start off at "Hide".

Thanks, and great work, it's really looking nice now!

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Tue, 2008-08-19 02:24

Phinze your fix worked! Thanks buddy.
Commenting works but tagging has issues :

An error occurred while saving: Error (ERROR_MISSING_OBJECT)in modules/imageareas/classes/TagAreaInterface_1_3_6.class at line 64 (TagAreaInterface_1_3_6::error) in modules/imageareas/classes/ImageAreaInterface.class at line 131 (TagAreaInterface_1_3_6::getOutputData) in modules/imageareas/classes/ImageArea.class at line 124 (TagAreaInterface_1_3_6::renderOutput) in modules/imageareas/classes/ImageArea.class at line 156 (ImageArea::renderOutput) in modules/imageareas/classes/ImageAreasHelper.class at line 79 (ImageArea::toArray) in modules/imageareas/ImageAreasCallback.inc at line 101 (ImageAreasCallbackView::processInput) in main.php at line 449 (ImageAreasCallbackView::renderImmediate) in main.php at line 103 in main.php at line 88

What do you think?

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Tue, 2008-08-19 19:45

tlmothy: Turns out a very similar regexp problem was happening in the TagsAreaInterface. Still not sure why your particular version of PHP doesn't like it, but if the fix works I won't ask any questions. ;) Here's the fixed release... hopefully this will be the end of your error messages!

Releases can be found here: http://projects.phinze.com/imageareas/releases/

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Tue, 2008-08-19 17:14

Great stuff, whatever you fixed worked. Much appreciated.

It seems that only I can see the areas when I login. When I log out I cannot see the areas. It seems to be a permission bug.

I have set:

Everybody [imageareas] view Image Areas

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Tue, 2008-08-19 15:42

I just hit an apparent internationalization problem - if I switch my Gallery2 session to Spanish, the imageareas go away, although I can still see the associated comments. Oddly if I switch to Chinese, they come back!

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Tue, 2008-08-19 19:03

@tlmothy: Seems there were quite a few regression bugs in the 0.2.3 release. I've smushed a couple more of them, including the one you reported. Release below. I'm working on setting up some proper regression testing to prevent this from happening again.

@cchiappa: I have a hunch as to why that is happening, but I need to recompile my local PHP with gettext so I can test internationalization. I'll keep you posted.

I've set up a better way to distribute the releases. Rather than attaching them to messages in this thread, I'll put them at this link:

http://projects.phinze.com/imageareas/releases/

You'll find the latest bugfix release, 0.2.3e, there.

I really appreciate all the help everyone's giving me by testing out the module!

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Wed, 2008-08-20 01:59

Phinze that did the trick. Thanks a lot. I also noticed that IE has some issued with alignment. Check it out in IE here
http://www.gallerymania.net/main.php?g2_itemId=42895&

I disabled the plugin and everything goes back to normal. So it has to do with imageareas. Just letting you know. Thanks!

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Thu, 2008-08-21 00:03

I download the latest tar file and uploaded it to my modules directory. I then installed the module via the plugin page of Gallery2. Then I went to my main gallery and tried to use the plugin, but get the following error:

ImageAreas Module Error
Something went wrong!

A JavaScript error occured, which caused the browser to fall through to this link. This could mean any one of several problems:

1. You have JavaScript turned off in your browser. The ImageAreas module requires JavaScript to function.
2. You are using an unsupported browser. This module has been successfully tested on Firefox 3, Safari 3, and Internet Explorer 7.
3. Some unexpected error occurred in the module. If you are using a modern browser with JavaScript activated, please contact the developer, who will work to fix any bug you may have found.

I have this error on FireFox3, 2, IE6.

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Thu, 2008-08-21 01:58

you need to assign the image areas block to your photo page

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Thu, 2008-08-21 15:19

Thanks, that worked, tlmothy!

However, I have my permissions also so that EVERYBODY can view the IMAGE AREAS...but when I log out and pretend to be a guest user, I click SHOW/HIDE IMAGE AREAS, THEN CLICK IT AGAIN and the image area doesn't not appear on the photo.

It seems that I can only view it if i am an Admin.

Any ideas?

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Thu, 2008-08-21 16:43

You need to update to the latest version:

http://projects.phinze.com/imageareas/releases/

Just extract the latest tar file within your imageareas directory. Then disable and enable the plugin again.

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Thu, 2008-08-21 16:53

Hi,
I have the latest as I had installed it for the first time this morning according to that link ('e' version).

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Thu, 2008-08-21 19:26

it's probably a bug, I would talk to phinze for a fix.

 
tsfftf

Joined: 2007-02-02
Posts: 73
Posted: Sat, 2008-08-23 00:18

PHINZE! finally got this working. There was no problem with my gallery2 install or the module. I'm sorry it dragged out. After updating my gallery2 to 2.2.5 and making absolutely sure I had the 0.2.3e alpha in the right directory, along with fiddling about in the gallery permissions, themes, blocks etc, I finally realised this thing had its own page in the admin section. The problem was that my comment and tags modules weren't up to date. I have two 'comment modules' listed on the diagnostic page however and it is coming up as not having comment 1.1.12 plugin installed - I'm confused as I already have a comment module on - i'm assuming this should be straightforward to resolve now. Let me know how to get this fixed and i'll be eagerly testing your mod.

 
Daniel_Dietz

Joined: 2008-08-25
Posts: 12
Posted: Mon, 2008-08-25 19:06
ImageAreas Module

An error occurred while saving: Error (ERROR_BAD_PARAMETER)in modules/imageareas/classes/ImageArea.class at line 172 (GalleryCoreApi::error) in modules/imageareas/classes/ImageArea.class at line 148 (ImageArea::getBoundsAsArray) in modules/imageareas/classes/ImageAreasHelper.class at line 79 (ImageArea::toArray) in modules/imageareas/ImageAreasCallback.inc at line 101 (ImageAreasHelper::processInput) in main.php at line 433 (ImageAreasCallbackView::renderImmediate) in main.php at line 94 in main.php at line 83 

This error shows up when tagging a Person.

When opening a previously tagged picture (the error mentioned above has occurred) I get the following error:

ImageAreas Module

Error while loading the UI from the server: Error (ERROR_BAD_PARAMETER)in modules/imageareas/classes/ImageArea.class at line 172 (GalleryCoreApi::error) in modules/imageareas/classes/ImageArea.class at line 148 (ImageArea::getBoundsAsArray) in modules/imageareas/classes/ImageAreasHelper.class at line 185 (ImageArea::toArray) in modules/imageareas/classes/ImageAreasHelper.class at line 50 (ImageAreasHelper::getImageAreasUI) in modules/imageareas/ImageAreasCallback.inc at line 101 (ImageAreasHelper::processInput) in main.php at line 433 (ImageAreasCallbackView::renderImmediate) in main.php at line 94 in main.php at line 83  

I have ImageAreas 0.2.3 [alpha] Version: e installed

Gallery Informations

Gallery-Version = 2.2.5 Kern 1.2.0.7
PHP-Version = 5.2.6-0.dotdeb.1 cgi-fcgi
Webserver = Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.6-0.dotdeb.1 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8e
Datenbank = mysqli 5.0.67-0.dotdeb.1-log, lock.system=database
Werkzeuge = ArchiveUpload, Dcraw, Getid3, LinkItemToolkit, Thumbnail, Gd, Ffmpeg, ImageMagick, Exif
Beschleunigung = full/86400, none/0
Betriebssystem = Linux h1236941 2.6.18-4-amd64 #1 SMP Fri May 4 00:37:33 UTC 2007 x86_64
Standard-Motiv = matrix_D
gettext = Aktiviert
Sprache = de_DE
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
Zeilen in der GalleryAccessMap Tabelle = 49
Zeilen in der GalleryAccessSubscriberMap Tabelle = 7377
Zeilen in der GalleryUser Tabelle = 3
Zeilen in der GalleryItem Tabelle = 7334
Zeilen in der GalleryAlbumItem Tabelle = 55
Zeilen in der GalleryCacheMap Tabelle = 269 
 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Wed, 2008-08-27 14:33

Hrmm, I'm getting the same problem as Daniel now, but when trying to add an ImageArea to a picture (and subsequently when returning to a picture for which the add failed). I don't believe I changed anything from when it was working...svn updating to the latest version doesn't help. I can still view existing, previously working ImageAreas OK.

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Wed, 2008-08-27 18:03

Hi all, sorry I've been AWOL for a while. Been moving out to NY. Now I'm here and set up with a glorious fiber optic connection and ready to get back to kicking ImageAreas around. Let's go one by one here...

tlmothy wrote:
I also noticed that IE has some issued with alignment...

Can't get to IE today, but I'll take a look soon.

skunker wrote:
However, I have my permissions also so that EVERYBODY can view the IMAGE AREAS...but when I log out and pretend to be a guest user, I click SHOW/HIDE IMAGE AREAS, THEN CLICK IT AGAIN and the image area doesn't not appear on the photo.

I can't seem to reproduce this on FF3. Does this happen to you on every browser, or just one? Also, what version of G2 and theme are you using?

Daniel_Dietz wrote:
This error shows up when tagging a Person.

cchiappa wrote:
Hrmm, I'm getting the same problem as Daniel now...

I believe this is an internationalization issue that has to do with the fact that some locales represent decimals using commas instead of periods, and I'm using commas to divide the bounds fields when I store them. I'll change the way I store bounds and make a new release and we'll see if that fixes things.

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Thu, 2008-08-28 17:58

ImageAreas 0.2.4 [alpha]

  • Changes bounds storage delimiter to '|' to avoid improper parsing in locales which use decimal comma.
    NOTE: Any ImageArea with corrupted bounds data will be automatically changed to a 100x100px box at coordinate (0,0). If there are several of these on one image they will appear stacked on one another and must be repositioned with "Edit ImageArea".
  • Adds CSS protection for an IE display issue with the ICE theme.
  • Includes all bugfixes made in 0.2.3a - 0.2.3e

Releases can be found here: http://projects.phinze.com/imageareas/releases/

 
Daniel_Dietz

Joined: 2008-08-25
Posts: 12
Posted: Thu, 2008-08-28 23:43

I still have the following error while tagging a person

ImageAreas Module

An error occurred while saving: Error (ERROR_BAD_PARAMETER)in modules/imageareas/classes/ImageArea.class at line 172 (GalleryCoreApi::error) in modules/imageareas/classes/ImageArea.class at line 148 (ImageArea::getBoundsAsArray) in modules/imageareas/classes/ImageAreasHelper.class at line 79 (ImageArea::toArray) in modules/imageareas/ImageAreasCallback.inc at line 101 (ImageAreasHelper::processInput) in main.php at line 433 (ImageAreasCallbackView::renderImmediate) in main.php at line 94 in main.php at line 83 

Some more information about my gallery installation

ImageAreas Diagnostics

The ImageAreas module depends on interfaces with other plugins to store data. Here you can see which other plugins are supported and whether or not ImageAreas has detected them. Go to the plugins admin to install required plugins.

Installed Interfaces
DataType Description Supported Module Supported Version Module Installed? Module Active?
Comment Add a comment comment 1.1.12 No No
Comment Add a comment comment 1.1.3.2 Yes Yes
Tag Tag a Person/Item tags 1.3.6 Yes Yes

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Fri, 2008-08-29 08:21

Amazing job phinze. I really do appreciate all the work you have done and the very fast bug fixes.

Thanks a lot!

 
Daniel_Dietz

Joined: 2008-08-25
Posts: 12
Posted: Sun, 2008-08-31 02:33

Does anybody knows why I still get the error? Due to the fact that it is exactly the same error message as before I don't think it was cause by the commas phinze mentioned.

 
phinze

Joined: 2008-03-30
Posts: 40
Posted: Sun, 2008-08-31 04:47

@Daniel_Dietz: Can you give me access to the Gallery installation where you are experiencing the error? If so, PM me some credentials and I'll check it out and hopefully release a fix!

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Sun, 2008-08-31 04:56

phinze - I get the error on one of my pictures that had a bad imagearea on it. I think I tried deleting it but get the error when going to the picture. I'll PM you the URL.

 
baseball2487

Joined: 2007-02-08
Posts: 13
Posted: Mon, 2008-09-01 22:37

I tried installing the imageareas plugin latest 0.2.4 and when I click on add image area or show\hide image area I get

Quote:
ImageAreas Module Error
Something went wrong!

A JavaScript error occured, which caused the browser to fall through to this link. This could mean any one of several problems:

1. You have JavaScript turned off in your browser. The ImageAreas module requires JavaScript to function.
2. You are using an unsupported browser. This module has been successfully tested on Firefox 3, Safari 3, and Internet Explorer 7.
3. Some unexpected error occurred in the module. If you are using a modern browser with JavaScript activated, please contact the developer, who will work to fix any bug you may have found.

I've tried with Firefox 3.0.1 and IE 7. I tried activating the debug module however the errors are getting caught by your module so I'm not sure what's happening. The only think I can think of is that I have 2.3 RC1 installed, is it compaible with that gallery version? I have both comment and tag modules installed and recognized -

Quote:
ImageAreas Diagnostics

The ImageAreas module depends on interfaces with other plugins to store data. Here you can see which other plugins are supported and whether or not ImageAreas has detected them. Go to the plugins admin to install required plugins.
Installed Interfaces
DataType Description Supported Module Supported Version Module Installed? Module Active?
Comment Add a comment comment 1.1.12 Yes Yes
Comment Add a comment comment 1.1.3.2 No No
Tag Tag a Person/Item tags 1.3.6 Yes Yes

My installation info -

Quote:
Gallery version = 2.3-RC1 core 1.2.36
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.4
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (CentOS)
Database = mysqli 5.0.45-log, lock.system=database
Toolkits = jpegtran, Getid3, LinkItemToolkit, Thumbnail, ArchiveUpload, Dcraw, Ffmpeg, ImageMagick, NetPBM, Gd
Acceleration = full/900, partial/900
Operating system = Linux localhost.localdomain 2.6.18-92.1.10.el5 #1 SMP Tue Aug 5 07:41:53 EDT 2008 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Rows in GalleryAccessMap table = X
Rows in GalleryAccessSubscriberMap table = X
Rows in GalleryUser table = X
Rows in GalleryItem table = X
Rows in GalleryAlbumItem table = X
Rows in GalleryCacheMap table = X

Thanks for working on this and hope to get it running soon

 
Daniel_Dietz

Joined: 2008-08-25
Posts: 12
Posted: Tue, 2008-09-02 09:29

I just tried the Tags while tagging a person are generated correctly.

@baseball2487
You have to add the "Image Areas Support" to the photo page then this error should be gone

 
tsfftf

Joined: 2007-02-02
Posts: 73
Posted: Sat, 2008-09-13 10:29

@baseball2847 i have the same message coming up but this is dependent on which theme i use. if i use a customised theme (if i recall correctly the only modifications that were made to the photo.tpl page were a few {a} and {/a} characters to enable netbear's imagetags module to function) it prompts me with this error, however if I use the default matrix it doesn't give me this error: instead i have a red box in the corner of the screen.

keep up the good work anyway phinze.

 
tsfftf

Joined: 2007-02-02
Posts: 73
Posted: Sat, 2008-09-13 10:30

@Daniel_Dietz - i'm pretty confident i have the "Image Areas Support" added to the photo pages in each theme although that's something I'll check.