modxcms / evolution

This repository was Frozen. Welcome to the new evolution of MODX Evolution!
https://github.com/evolution-cms/
178 stars 207 forks source link

Easy 2 Gallery 1.5.0-rc1 ( testing help needed ) #1117

Closed Breezer closed 7 years ago

Breezer commented 7 years ago

I've been working on updating Easy 2 Gallery to work with 1.1+, I would appreciate any help testing and feedback. I will post this on the forum soon but thats a dead zone pretty much methinks.

I have so far changed all mysql to mysqli (pretty sure I got them all) and changed the comments functionality.

http://frsbuilders.net/downloads

risingisland commented 7 years ago

I followed the link, but receive a "IP has been banned permanently" message :(

Breezer commented 7 years ago

sorry, you should be good to go now.

risingisland commented 7 years ago

Installed fine, uploaded images fine. Front-end I receive this error:

409 : damn#1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, 8' at line 1 SELECT * FROM modx12_easy2_files WHERE dir_id IN (1) AND status = 1 ORDER BY date_added ASC LIMIT -1, 8

My MySQL version on Xampp is: 5.5.27

Breezer commented 7 years ago

Yes I got that error too, but I'm not familiar enough with this code to figure out how to fix that. That happens when you call a folder, I had to use &showonly=images in the snippet call to remove the error. I know where the error occurs but not why, hence the damn part of the error message :)

At least I know that is reproduceable and it wasn't just my setup. I'll keep plugging along and get it figured out.

risingisland commented 7 years ago

Also, the "assets/libs" folder was not included in the download. Not sure if you realized that or not. I think I would recommend moving the contents of that folder to "assets/lib/e2g" maybe?

Breezer commented 7 years ago

oh dang I forgot about that, I'll fix the upload right quick. Changing the path does seem like a good idea.

edit: download zip has been fixed, thanks for the heads up.

Breezer commented 7 years ago

The error is in easy2/includes/models/e2g.snippet.class.php, somewhere in the math between lines 393 and 411. To test I added the following to line 412:

echo "<p>selected files: ".__LINE__. '<br>'. $selectFiles.'</p>';
$selectFiles = str_replace( "-1,", "0,", $selectFiles );
echo "<p>modified selected files: ". $selectFiles.'</p>';

[!easy2? &gid=1!]

This seemed to make the galleries work as expected as far as I can tell.

risingisland commented 7 years ago

I just added this and see no change for me. Still the same error. :/

risingisland commented 7 years ago

@Breezer Did you make any other changes to get this working for you? I am still getting the "damn error"

Breezer commented 7 years ago

No sir, thats the only change I made. I have a default install with the following order: easy2( gal id 1 ) / folder1 ( gal id 2 ) easy2( gal id 1 ) / folder2( gal id 3 )

snippet call is [!easy2? &gid=1!]

sorry for late answer my internet is acting up today.

risingisland commented 7 years ago

Hmm, ok. Just started messing around with it a bit. I did get it to work, but it isnt a working solution.

I created 3 folders, each with an image in them, and one image outside (in ID 1) Using [!easy2? &gid=1!] did get rid of the error, and I was able to see the one image and three folders, but clicking on any folder (the link was something like &sid=1&gid=4#1_4) led to a 404. If I tried to call a different folder [!easy2? &gid=3!], I would end up with the "damn" error, unless it too was containing sub-folders.

Breezer commented 7 years ago

try using the same easy2 calls on a different page, that link looks familiar so I bet you have this set up on your home page.

risingisland commented 7 years ago

Ha, ok. I dont remember noticing that before. Yes, on another page it works. Is this a localhost issue?

So, just no more [!easy2!], a base ID has to be called then?

Breezer commented 7 years ago

Actually now that basic empty snippet call on the home page works for me, I know it wasn't before but that was before I changed the -1 to 0. I hadn't tested that since then. i'm using localhost as well so I doubt thats the issue.

risingisland commented 7 years ago

Im getting nowhere fast. :( Would you mind updating the "modules/east2/.version" file and re-upload what you have that is working? I am going to do a fresh install of Modx and e2g and see what happens...

Breezer commented 7 years ago

ok there is an rc2 in the downloads page, thats my current working version. As far as evolution, its a default install with everything checked and sample site installed. On my home page the snippet call is: [!easy2!] This is working with and without furls enabled.

Apache Version : 2.2.22
PHP Version : 5.3.13 MySQL Version : 5.5.24

risingisland commented 7 years ago

OK, now it seems to be working fine, as far as I can tell. Thank you.

I do see that you had commented out the two echo statements, which I did not. I dont know if this was the problem, or if it was something else.

Still cant browse folders on home page, but I think that this is a localhost thing.

risingisland commented 7 years ago

Sorry, next round of problems discovered... I believe that there is a problem with the installer, but not positive.

After creating a clean install, including Modx, I am not able to browse folders. The link for the folder is id=33&sid=8&gid=2#8_2, but after clicking on it or returning to the page, the link changes to id=33&sid=12&gid=2#12_2, and each time it is clicked, "sid" and "gid" climb.

Upgrading from a previous version, I receive the following error:

Fatal error: Call to undefined function mysqli_result() in \assets\modules\easy2\install\install.class.php on line 1210

Removing the install directory, everything works again, but I dont know if install finished.

So basically, I either have to run it as an upgrade to function, otherwise no folder browsing.

Breezer commented 7 years ago

Ok looks like I'll need to go through the installer and change the mysqli to $modx-db functions. I'll try to get that fixed up in the next couple days and we'll see what happens. Thanks for the help bug finding.

Breezer commented 7 years ago

After creating a clean install, including Modx, I am not able to browse folders. The link for the folder is id=33&sid=8&gid=2#8_2, but after clicking on it or returning to the page, the link changes to id=33&sid=12&gid=2#12_2, and each time it is clicked, "sid" and "gid" climb.

I just ran into this while installing, all I had to do to fix it was to open the easy2 plugin, and then save. Maybe a cache issue?

More work on the installer so I should have an rc3 in a day or so.

risingisland commented 7 years ago

While trying to figure out what was going on, I did clear the cache in modx, set the resource to not cache, and cleared the cache in e2g, and none of those worked. However, I did not try re-saving the plugin or module. I think I was tired out by then :flushed:

Will wait for the update. Thanks for your help :+1:

Breezer commented 7 years ago

There is an rc3 in the downloads section to try. After further testing I found that you can save any one of the following after installation to get the gallery to function: easy2gallery snippet easy2gallery plugin easy2gallery module

Could be something to do with the new cache system is my guess. It did the same thing when I installed an xforum test in evo 1.2, loss of some functionality until the snippet was saved.

risingisland commented 7 years ago

Will take a look tomorrow. Thanks for the info.

Yes, I believe there is something going on with the new cache system, as I was having troubles with another plugin, and it was pointed out that by opening it and saving it again would get it working.

risingisland commented 7 years ago

I think the new download is missing the install directory.

Breezer commented 7 years ago

oops I forgot to rename it. I fixed the download, but all you need to do is go and rename the install_orig to install.

risingisland commented 7 years ago

As far as I can tell, everything is working as expected. :+1: I did both a clean install and upgrade, both went fine no errors, and working on front-end.

I see that you removed tinymce. I was doing the same, along with some other cleaning up. Mainly to the back-end template. Instead of adding missing icons, I was replacing the main menu icons with fontawesome, now that it is included with modx. Along with some other tpl fixes. Will send it to you this evening or tomorrow to see what you think.

risingisland commented 7 years ago

Here it is with a few changes, tell me what you think. edit: (link removed) updated below...

risingisland commented 7 years ago

Also, I dont know if this is something that you can take a look at? It is a preexisting problem, where if you edit an image or folder (name, summary, tag, etc.), it doesnt allow it to be blank after given data. Ie., if you give an image a name or summary, and later wish to remove it, you cant leave it blank. It must contain at least one "single space", otherwise it defaults to previous information.

Breezer commented 7 years ago

Sorry my internet connection is horrible since the hurricane ugh. I'll check out your zip, new icons sound great.

I'll check into the persistent data issue and see what I can find.

risingisland commented 7 years ago

Slight cleanup of icons. Still more to do... easy2gallery-1.5.2-rc3.zip

Breezer commented 7 years ago

That looks great :) I'll wait until you finish with the tpl and merge the fixed installer and put it out for download.

I figured out the limited functionality after install issue, I added $this->modx->clearCache( 'full' ); at the very end of the installation process and all is well now.

risingisland commented 7 years ago

I think it is ready, Maybe have to change a few colors or do some minor adjustments.

I cant for the life of me find where to get rid of the padding and make float right, the icons when you mouse-over an image or folder. The check box partially covers an icon. image grid

easy2gallery-1.5.3-rc3.zip

Nicola1971 commented 7 years ago

@Breezer @risingisland

New version looks very good, congrats

just some comments/questions:

1) please, create a dedicated repo for issues and commits (ie: missing italian language) 2) please, create a Evo installer (for Package Manager and Extras module). 3) why libs are not inside module folder? 4) please add OnManagerMainFrameHeaderHTMLBlock - see: https://github.com/modxcms/evolution/issues/1037 and https://github.com/modxcms/evolution/pull/1090 3) about the UI:

Breezer commented 7 years ago

@Nicola1971 Thanks much, I think it's coming along nicely as far as getting it to work and upgrading the look. As with everything it's a work in progress for sure.

re: comments/questions

  1. Unfortunately my work computer is too old to use git so someone else will have to handle that part
  2. I'll look into the package installer - where can I find examples or howto?
  3. That would be a better idea I think too
  4. I'll look into that
  5. I agree on all 3 points, a common theme for modules to match the manager just looks more professional IMO

@risingisland Yes thats looking very nice

risingisland commented 7 years ago

@Breezer @Nicola1971 Started a new repository here: https://github.com/risingisland/Easy-2-Gallery

I am new to Git, so still trying to figure it out...

Nicola1971 commented 7 years ago

@risingisland good, I will move suggestions issue to the repository.

Breezer commented 7 years ago

comment removed

risingisland commented 7 years ago

@Breezer All gallery downloads are missing. Also, the new repository is up, you can move posts there now.

fourroses666 commented 7 years ago

Just updated a site with Easy2Gallery. Error : mysql_query(): Access denied for user 'root'@'localhost' (using password: NO)

My version is problably very old, folders are not the same :(

Any idea how to fix it?

Breezer commented 7 years ago

There is a new repository for the current working version:

https://github.com/risingisland/Easy-2-Gallery

fourroses666 commented 7 years ago

Oke thanks, will try. So its possible to update an existing gallery with that one?

fourroses666 commented 7 years ago

Ah its in the readme.