link album planned?

mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2006-01-08 16:28

linkitem module is now in BRANCH_API_DEV CVS, scheduled for merge into CVS HEAD tomorrow.. so you should see the linkitem module in nightly snapshots in a few days.

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Tue, 2006-01-10 13:35

I just downloaded latest nightly build but was unable to use AlbumLink 2.1 with it.

Quote:
Incompatible module!
Core API Required: 6.11 (available: 7.1)
Module API Required: 2.0 (available: 3.0)

What version do I need to use this module?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-01-10 14:09

the next nightly snapshot includes the linkitem module. no need to use the one from the forums.
the one that is included is compatible.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-18 01:50

g2.1 already ships with the linkitem module. no need to use the album link module from this forum thread.

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Wed, 2006-01-18 02:28

downloaded latest nightly, and when u select link photo, u can only view link to album inside g2, not external link! or do u put external link somewhere else?

Gallery version = 2.1.0- core 1.0.18
PHP version = 4.3.3 cgi-fcgi
Webserver = Microsoft-IIS/5.0
Database = mysql 4.0.15-nt-log
Toolkits = Exif, ImageMagick, SquareThumb, Thumbnail, ArchiveUpload
Operating system = Windows NT INTRAWEB 5.0 build 2195
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
------------------------------------------------------------------------------
...you can help, too! :)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-18 06:59

if you go to
add item -> link,
then you can select between entering a random url or to link to an album.

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Wed, 2006-01-18 12:03

ooh ok, i thought u first add image and then asign a link for it :)

anyway, i created a link....but when i click on it (chain image) i get this error:

Fatal error: Call to undefined function: canbeviewedinline() in

...\modules\core\classes\GalleryTheme.class on line 1577
------------------------------------------------------------------------------
...you can help, too! :)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-01-18 17:51

yup, just found and fixed that bug yesterday. update from CVS or get the current nightly snapshot and linkitems should work again.

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Fri, 2006-01-20 14:50

OK it works nice now but got one problem, when i try to edit link url, i get following error:

Edit Conflict!

Your change cannot be completed because somebody else has made a conflicting change to the same item. Use the back button in your browser to go back to the page you were on, then reload that page and try your change again.
Go back and try again

Alternatively, you can return to the main Gallery page and resume browsing.

Back to the Gallery

Error Detail -
Error (ERROR_OBSOLETE_DATA) : UPDATE g2_Entity SET g_modificationTimestamp=?,g_serialNumber=? WHERE g_id=? AND g_serialNumber=? (1137768779|7|157|6)

* in modules\core\classes\GalleryStorage\GalleryStorageExtras.class at line 374 (gallerycoreapi::error)
* in modules\core\classes\GalleryStorage.class at line 277 (gallerystorageextras::saveentity)
* in modules\core\classes\GalleryEntity.class at line 315 (mysqlstorage::saveentity)
* in modules\core\classes\GalleryItem.class at line 403 (galleryfilesystementity::save)
* in modules\linkitem\LinkItemOption.inc at line 74 (gallerylinkitem::save)
* in modules\core\ItemEdit.inc at line 111 (linkitemoption::handlerequestafteredit)
* in main.php at line 203 (itemeditcontroller::handlerequest)
* in main.php at line 88
* in main.php at line 81

System Information
Gallery version 2.1.0-
PHP version 4.3.3 cgi-fcgi
Webserver Microsoft-IIS/5.0
Database mysql 4.0.15-nt-log
Toolkits SquareThumb, ImageMagick
Operating system Windows NT INTRAWEB 5.0 build 2195
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

attached buffered log
Tnx
------------------------------------------------------------------------------
...you can help, too! :)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2006-01-20 18:06

lib/support/index.php
delete cached entities.

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Fri, 2006-01-20 21:45

well i was just waiting for this to happen! i have to transfer from Linux to Win/IIS5, and in Win i cant access thatpage! i can access lib/support/index.php but when enter password i get 405 error!

The page cannot be displayed
The page you are looking for cannot be displayed because the page address is incorrect.

Please try the following:

* If you typed the page address in the Address bar, check that it is entered correctly.
* Open the intraweb.iaeste.hr home page and then look for links to the information you want.

HTTP 405 - Resource not allowed
Internet Information Services

i found issue http://gallery.menalto.com/node/35124, and deleted all folders manually. and even then i get same error! so error is happening only when i try to save changes to linkitem item value. when change the name or title of linkitem item changes are saved successfully! i easily enter the database and change values, clear cache and then the value is changed.

------------------------------------------------------------------------------
...you can help, too! :)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2006-01-20 23:01

you can post about the lib/support problem in the support forums.
did you delete all dirs under "cache"? cache/entity is the one i was referring to.

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sat, 2006-01-21 06:42

Ouch, after upgrading to 2.1, my old albumlinks arn't working. I got the old module "albumlinks" to uninstall (after adjusting module.inc)
but trying to open a folder containing linked items, I get an error

<b>Security Violation</b>
Error Detail -
Error (ERROR_BAD_PARAMETER) : Unknown entity type: AlbumLinkItem

    * in modules\core\classes\GalleryStorage\GalleryStorageExtras.class at line 1865 (GalleryCoreApi::error)
    * in modules\core\classes\GalleryStorage\GalleryStorageExtras.class at line 1837 (GalleryStorageExtras::describeEntity)
    * in modules\core\classes\GalleryStorage\GalleryStorageExtras.class at line 133 (GalleryStorageExtras::describeEntity)
    * in modules\core\classes\GalleryStorage.class at line 266 (GalleryStorageExtras::loadEntities)
    * in modules\core\classes\helpers\GalleryEntityHelper_simple.class at line 82 (GalleryStorage::loadEntities)
    * in modules\core\classes\GalleryCoreApi.class at line 2380 (GalleryEntityHelper_simple::loadEntitiesById)
    * in modules\core\classes\GalleryTheme.class at line 1062 (GalleryCoreApi::loadEntitiesById)
    * in modules\core\classes\GalleryTheme.class at line 874 (GalleryTheme::loadCommonTemplateData)
    * in modules\core\classes\GalleryView.class at line 325 (GalleryTheme::loadTemplate)
    * in main.php at line 338 (GalleryView::doLoadTemplate)
    * in main.php at line 88
    * in main.php at line 81

Any idea??

attached the debug-log

Gallery version = 2.1.0- core 1.0.18
PHP version=5.1.2 apache2handler
Webserver=Apache/2.2.0 (Win32) DAV/2 PHP/5.1.1 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database=mysql 5.0.16-nt-log
Gallery-URL=http://lf-photodesign.de

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sat, 2006-01-21 07:14

Strange - I can access the individual linked albums from the navigator - but not the album containing the links

Opened new thread here: http://gallery.menalto.com/node/43198

Gallery version = 2.1.0- core 1.0.18
PHP version=5.1.2 apache2handler
Webserver=Apache/2.2.0 (Win32) DAV/2 PHP/5.1.1 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database=mysql 5.0.16-nt-log
Gallery-URL=http://lf-photodesign.de

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2006-01-21 15:49

LFrank, you've got a couple choices:
- if you're ok with deleting the existing links, select g_id from g2_Entity where g_entityType = 'AlbumLinkItem' .. then write your own script to call GalleryCoreApi::deleteEntityById on those ids (you could put those calls in theme.inc showAlbumPage and load main.php once, then remove those lines).
- if you prefer to save those items I think you might be able to convert to the new module.. check schema.tpl in the new linkitem module and alter the table you have to match that.. maybe you just have to rename the table, maybe you have to change the column names, definitions.. not sure. Then UPDATE g2_Entity set g_entityType = 'GalleryLinkItem' where g_entityType = 'AlbumLinkItem'; Then install the linkitem module and hopefully it will pick up those entities as valid links.

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sat, 2006-01-21 16:37

mindless, you're a genius !

after manually filling the g2_linkitem table with the content of the old g2_albumlinkitemtable, I only had to ise the UPDATE g2_entityType statement to bring my albums back to live!!!! It's back to normal now.

You made my day ;)

Lutz

Gallery version = 2.1.0- core 1.0.19
PHP version=5.1.2 apache2handler
Webserver=Apache/2.2.0 (Win32) DAV/2 PHP/5.1.1 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database=mysql 5.0.16-nt-log
Gallery-URL=http://lf-photodesign.de

 
mcdermottscott

Joined: 2005-09-19
Posts: 28
Posted: Wed, 2006-03-01 19:19

Having the same problem. Can you post explicit details on how to fix it? I don't care about saving the links (they are easy to add back). I am a little hesitant about creating my own script. Thanks!

Later,
Scott

 
mcdermottscott

Joined: 2005-09-19
Posts: 28
Posted: Wed, 2006-03-01 22:55

Ok, so I have the id's of the bad links (thanks to phpmyadmin) and I put this line into (various locations, for 1-4 of the bad id's) my theme.inc file for my default template:
GalleryCoreApi::deleteEntityById(15043);
But nothing happens! No error, and no delete that I can find. I figure I must be using the wrong form for the function. When I display the output (passing it to theme.tpl), it reads "Object id #48". Thoughts?

Oh, my sysinfo is:
Gallery version = 2.1-rc-1a core 1.0.28
PHP version = 5.0.5 apache2handler
Webserver = Apache/2.0.53 (Win32) mod_perl/1.99_13 Perl/v5.8.6 mod_ssl/2.0.55 OpenSSL/0.9.8a PHP/5.0.5
Database = mysql 5.0.16-nt
Toolkits = Thumbnail, Gd, Dcraw, NetPBM, ArchiveUpload, Ffmpeg, ImageMagick, Exif, SquareThumb
Operating system = Windows NT MCDERMOTT 5.1 build 2600
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Tablet PC 1.7; .NET CLR 1.0.3705; .NET CLR 1.1.4322)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-03-02 02:12

you can't use the api to delete an entity of a type the system doesn't know.
(if you don't check the return value, you won't get any error...)
delete those rows from any table where you find those ids (Entity, ChildEntity, FileSystemEntity, Item)

 
mcdermottscott

Joined: 2005-09-19
Posts: 28
Posted: Thu, 2006-03-02 04:40

Right on! It took a bit to make sure that I got them all (there are sure a bunch of empty tables in my db). Thanks a bunch!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-03-02 05:44

what version of g2 are you using?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-03-02 07:02

it's there a couple posts up... this was moving from old albumlink module to new linkitem module.

 
knownikko

Joined: 2005-09-17
Posts: 4
Posted: Fri, 2006-03-17 22:33

Wow, thanks to Mindless for helping so much with this issue. You originally helped me get this installed a couple months ago and now that I upgraded to 2.1 the instructions in the same thread helped me get my gallery back online again with a minimum of fuss.

I thought I'd spell out what I did in a little bit greater detail for those who aren't quite as familiar with MySQL.

This is how I got my linked items working again with the official module included with 2.1. This of course assumes you're using MySQL as the backend for your gallery. YMMV.

The official "Item Link" module included with Gallery 2.1 must be installed for this to work - if it's not then the new g2_LinkItem table you need to populate won't be in your database.

I used the mysql command line client to make the necessary table additions and modificaions.

Log into your database as a user with privileges to update the gallery database:

# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 238943 to server version: 4.1.12

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> 

Now, switch to your gallery database:

mysql> use <gallerydb>;

replace <gallerydb> with the name of your gallery database.

Now, print out the existing ID pairs in the g2_AlbumLinkItem table:

mysql> select * from g2_AlbumLinkItem;
+-------+-----------------+
| g_id  | g_linkedAlbumId |
+-------+-----------------+
| 86814 |           85734 |
| 84644 |           54757 |
| 84646 |           84481 |
| 84648 |           44568 |
| 86818 |           48925 |
| 84652 |           50608 |
| 86816 |           47502 |
| 86419 |           86308 |
| 86422 |           86009 |
| 86424 |           86244 |
| 86426 |           86153 |
| 86820 |           57920 |
| 86822 |           57758 |
| 88269 |           87609 |
| 91539 |           90613 |
+-------+-----------------+
15 rows in set (0.03 sec)

Each of these pairs of IDs coorespond to an album link somewhere in your gallery.

Now, you need to populate the new table, g2_LinkItem, with this data.

For EACH pair of IDs, do the following:

mysql> insert into g2_LinkItem (g_id, g_link) values (<value1>, <value2>);

where <value1> and <value2> coorespond to a pair of IDs you obtained from the SELECT statement above. This might get kind of tedious if you have a lot of links... There is probably a more efficient way to do this if you know MySQL better... but I don't... so this is how I did it.

After you've entered every pair of IDs, you should be able to print out the g2_LinkItem table and it should look like the old g2_AlbumLinkItem table:

mysql> select * from g2_LinkItem;
+-------+--------+
| g_id  | g_link |
+-------+--------+
| 86814 | 85734  |
| 84644 | 54757  |
| 84646 | 84481  |
| 84648 | 44568  |
| 86818 | 48925  |
| 84652 | 50608  |
| 86816 | 47502  |
| 86419 | 86308  |
| 86422 | 86009  |
| 86424 | 86244  |
| 86426 | 86153  |
| 86820 | 57920  |
| 86822 | 57758  |
| 88269 | 87609  |
| 91539 | 90613  |
+-------+--------+
15 rows in set (0.00 sec)

Now, the final step is to run one more line of SQL as mentioned in Mindless' previous post:

mysql> UPDATE g2_Entity set g_entityType = 'GalleryLinkItem' where g_entityType = 'AlbumLinkItem';

And, voila! At this point your pages should be restored and all of your links should be working.

Hope this helps someone... just trying to do my part.

-Nick

 
cynode

Joined: 2006-04-08
Posts: 6
Posted: Wed, 2006-06-07 14:24

Hi,

I've found an error of sorts, and have a question afterwards about this module.

First the error, I can't seem to add more than 100 link items to a single album, after number 100, when I try to add the 101st link item I get the error below. I can add new link items to other albums, and I can add non link items to the album with 100 link items, just not a 100th link item.

While I guess I could just split the album into two albums with less than 100 each, this is still a bug I thought I'd bring up, I assume it has to do with the database stopping at 100 or something (not real well versed on the workings of the databases).

My question is, can the link arrow be removed from the thumbnails, and if so where in the code should I be looking?

Here is the error I get:

Error (ERROR_COLLISION)

* in modules/core/classes/helpers/GalleryFileSystemEntityHelper_medium.class at line 146 (gallerycoreapi::error)
* in modules/core/classes/GalleryCoreApi.class at line 1920 (galleryfilesystementityhelper_medium::getlegalpathcomponent)
* in modules/core/classes/GalleryFileSystemEntity.class at line 98 (gallerycoreapi::getlegalpathcomponent)
* in modules/core/classes/GalleryItem.class at line 198 (galleryfilesystementity::create)
* in modules/linkitem/classes/GalleryLinkItem.class at line 92 (galleryitem::create)
* in modules/linkitem/ItemAddLinkItem.inc at line 65 (gallerylinkitem::create)
* in modules/core/ItemAdd.inc at line 93 (itemaddlinkitem::handlerequest)
* in index.php at line 199 (itemaddcontroller::handlerequest)
* in index.php at line 87
* in index.php at line 80

System Information
Gallery version 2.1
PHP version 4.4.2 apache
Webserver Apache/1.3.36 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.2 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.27 OpenSSL/0.9.7a
Database mysql 4.0.27-standard
Toolkits SquareThumb, ImageMagick, NetPBM, Gd
Operating system Linux 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-06-08 00:45

indeed, the code just sets the filename to 'linkitem' and the underlying code only checks 100 times to resolve filename conflicts. change modules/linkitem/classes/GalleryLinkItem.class line 90 and change:
$ret = parent::create($parentId, 'linkitem');
to:
$ret = parent::create($parentId, 'linkitem' . rand(1000,9999));
i'll commit the same change.

to omit the arrow on the thumbnail, edit modules/linkitem/ItemAddLinkItem.inc lin 158 and change it to
if (false) {
(instead if $isSupported)