Skip to main content
Topic: [ADDON] Levertine Gallery (Read 2774 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Levertine Gallery

Reply #75
Strange for sure.  

I see the server responds with a 302 requesting the gallery css file (main.css?1.1.1) and then a 404.  What is strange is that its requesting it from the wrong location and a 302 response is not from the gallery.

If i navigate directly to http://lurkts1.epizy.com/ts12/themes/default/levgal_res/main.css I see the file, but the server is requesting it from http://lurkts1.epizy.com/ts12/themes/default/css/main.css And its not there of course. Almost seems its fighting TP.
Be safe, Be kind, Happy Programing


Re: Levertine Gallery

Reply #77
Strange for sure.  

 Almost seems its fighting TP.

Thanks. It did the same before I installed TP.   I'll set up another fresh install tonight when I get home from work, and install just the 1.1.7 patch and legal.  That is what I did on this one originally.

Could it be either the patch isn’t the right one or it didn’t apply correctly? As there are/were fixes for other css directories in that 1.1.7 I thought?

Re: Levertine Gallery

Reply #78
I've managed to recreate the error again. Now to debug why it's failing.

Quote
This version: ElkArte 1.1.7 (more detailed)
Current version: 1.1.6
GD version: 2.2.5
MySQL version: 10.3.27-MariaDB-0+deb10u1
Alternative PHP Cache: 5.1.17
Zend OPcache: 7.3.27-1~deb10u1
PHP: 7.3.27-1~deb10u1 (apache2handler) (more detailed)
Server version: Apache/2.4.38 (Debian)
Version Information: Linux tinyportal 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64
Server Load: 0.17

I got the latest download of elkarte from the main site. https://github.com/elkarte/Elkarte/releases/download/v1.1.6/ElkArte_v1-1-6_install.zip

Created a tar.gz of the latest levertine gallery from bitbucket and uploaded that to the packages directory, saw that it wouldn't install so got the latest patch from here https://www.elkarte.net/community/index.php?action=dlattach;topic=5914.0;attach=6841

Applied that, then installed levertine. The CSS isn't correct and also the links don't work.

TinyPortal has not been installed or used at all on this, it's a completely new install so that's not the cause of this issue.

Re: Levertine Gallery

Reply #79
To update, calling cleanRequest() at the end of parseURL in the bootstrap fixes the url issue.

I think there is something wrong with the patch.

Edit:

It was meant to be this patch it turns out.

https://www.elkarte.net/community/index.php?action=dlattach;topic=5914.0;attach=6992

So I would guess @lurkalot has the first one in the topic, not the last one.

@spuds, could you update the first post for 1.1.7 to include the latest copy of the patch? I think that might help, if @lurkalot does confirm this is the issue.


Re: Levertine Gallery

Reply #81

@spuds, could you update the first post for 1.1.7 to include the latest copy of the patch? I think that might help, if @lurkalot does confirm this is the issue.

Confirmed, I'm an idiot.  Works nicely when using the latest 1.1.7 patch, thank you tino.  ;)

I'm so used to grabbing the latest zip from the first post like we do when testing over at tinyportal.net I should have read the whole topic in this case.   Apologies everyone.

Re: Levertine Gallery

Reply #82
OK, a couple of issues so far.  Uploading a image give me this error on page, nothing in error log.

"Something went wrong while uploading this item:
Something went wrong with the upload (invalid async). If the error continues contact the administrator."

And:  clicking the Gallery Stats gives me an error on page, and error in log.

"An Error Has Occurred
Division by zero"

Error log says,

Warning: Division by zero
http://lurkts1.epizy.com/ts12/index.php?action=media;sa=stats
File: /home/vol7_2/epizy.com/epiz_28298983/htdocs/ts12/sources/levgal_src/Model/Stats.php
Line: 198

Code: [Select]
182:				);
183: $max = 0;
184: $temp = array();
185: while ($row = $db->fetch_assoc($request))
186: {
187: $temp[] = $row;
188: if ($row['count'] > $max)
189: {
190: $max = $row['count'];
191: }
192: }
193: $db->free_result($request);
194:
195: // Now to add percentages.
196: foreach ($temp as $k => $v)
197: {
198: $temp[$k]['percent'] = round($v['count'] / $max * 100);
199: $temp[$k]['count_format'] = comma_format($v['count']);
200: $temp[$k]['item'] = '<a href="' . $scripturl . '?media/album/' . (!empty($v['album_slug']) ? $v['album_slug'] . '.' . $v['id_album'] : $v['id_album']) . '/">' . $v['album_name'] . '</a>';
201: }
202: cache_put_data($cache_key, $temp, $cache_ttl);
203: }
204:
205: return $temp;
206: }
207:
208: public function getTopItemsByComments()
209: {
210: global $scripturl;
211:
212: $db = database();
213:
214: $cache_ttl = 360;
215: $cache_key = 'lgal_top_items_by_comments-' . $this->groups;
216: if (($temp = cache_get_data($cache_key, $cache_ttl)) === null)
217: {
218: $album_list = $this->getVisibleAlbums();

Re: Levertine Gallery

Reply #83
, could you update the first post for 1.1.7 to include the latest copy of the patch? I think that might help,
Will do ... I'd been posting new versions in the thread as it progressed but should have removed the old or simply only updated the first.  Anyway sloppy on my part
.
Works nicely when using the latest 1.1.7 patch, thank you tino.  ;)
Awesome, glad it worked with the right level of everything and it was not some hard to figure out server contig issue.
OK, a couple of issues so far. 
The div by zero thing I fixed on my local, maybe on bitbucket as well.  Anyway its an empty gallery issue. 
Not sure on the invalid async, was that using the bulk or single add item?  Also what was the size of the file so I know if it was trying to chunk or not.  Either way I think I need to post the latest zip package to make sure we are all on the same level (to the first post of course ;D )
 
Be safe, Be kind, Happy Programing

 

Re: Levertine Gallery

Reply #84

Not sure on the invalid async, was that using the bulk or single add item?  Also what was the size of the file so I know if it was trying to chunk or not.  Either way I think I need to post the latest zip package to make sure we are all on the same level (to the first post of course ;D )
 

Thanks. I was using the single add item.  File was a jpg image of around 140kb

Re: Levertine Gallery

Reply #85
Updated the first post with the current state of the addon.
Be safe, Be kind, Happy Programing

Re: Levertine Gallery

Reply #86
And another update.  This one should fix a couple of rather annoying bugs I created with the new uploader.

1) Small (read below chunk size) files were failing with invalid async message.  This due to a missing post value
2) Non image files were failing be be accepted.  This due to the change to wait for the browser thumbnail generation to complete  which is needed to get the WxH of the supplied image.   Unfortunerly the on thumbnail event only fires for valid thumbnails.  So this change has it emit that event or all files so that the form acceptance code always runs.
3) With #2 I also supplied some generic thumbs for non image files, looks nicer in the upload form.

See the first post for the file.
Be safe, Be kind, Happy Programing