Closed Elfangor93 closed 2 years ago
@Elfangor93 I created category without any issues. But when tried to create new image I get error right after I click 'New' in Image Manager:
ENV
I reverted changes in /administrator/com_joomgallery/src/View/Faulties/HtmlView.php but no changes and error persist.
@szepty-ziemi : Yes, I know that. This issue will be fixed in the next PR. It is not ment to work in this PR.
Yes, I know that. This issue will be fixed in the next PR. It is not ment to work in this PR.
@Elfangor93 Okay, but one of the testing steps is Create an image using the image manager. so this issue seems to be a blocker.
Sorry @szepty-ziemi for my confusion. This bug you mention with the image creation should be fixed with commit b052477. Please make shure, that you are using the latest version of this PR. I forgot, that I fixed that... ;-)
@Elfangor93 I downloaded package once again. Removed previous installation and installed from fresh package. Issue persist:
I checked if your changes are available in ROOT/administrator/com_joomgallery/src/Model/ImageModel.php and they are:
Nevertheless error is still present. I've tried on Linux but outcome is the same.
Could you take a second look?
Yes, you are right @szepty-ziemi, there was a bug. Should be fixed now...
@Elfangor93 thank you, I confirm that it works. But noticed another issue:
GIVEN User has already successfully created and image WHEN Clicking on image name to edit image THEN Error appears BUT User should be able to enter image editing mode
ENV: https://prnt.sc/vZjYcGgpiOCX
This is not a blocker so I will proceed with further testing.
The issues in the image manager will be fixed with the next PR. This is ment to finish the FileManager service not the image manager GUI.
I followed testing guide:
So trying to process 'image-1' that sits in 'category-1' file is here (published was 0 but I changed it to 1 with the same result):
When moving to Components->JoomGallery->Maintenance Manager, nothing happens. No folders are created no info is displayed.
@Elfangor93 Am I doing something wrong? Or misunderstood the instructions?
The code you copied is just a template. In order to perform something you have to uncomment the line you want to perform.
And take care that line 66 and 67 are adjusted according to your image and category structure you created.
If you try to process image-1 you need to adjust the filename row of your record in the database according to your settings in the code including file extension (image-1-filename.jpg)
The settings for the category-1 seems correct.
If you correctly set up database (category and image) and code, you can uncomment for example line 73 to create the folders for your category-1.
So uncomment the line and refresh the page in the maintenance manager and you should see a message and the folders /images created in the file explorer.
@Elfangor93 thank you for explanation. I was able to confirm:
Could you explain how to use:
As they are not in the template and I can't figure out how to use them properly.
When testing:
I encountered on an issue. I've created new image type "fix"
Then run this method:
And this was displayed:
Structure was correctly created:
But image itself become... well... strange:
Original is:
Please, advise.
I encountered on an issue. I've created new image type "fix"
@szepty-ziemi Yes, I agree with you. I think the use of 'new' image types is generally problematic: If there are already images exists and then new image types are added in the configuration or changes are made to the existing image types, this does not affect the existing images but only future ones. Presumably this will often lead to confusion. I see the implementation of 'any' number of new image types as quite difficult, also with regard to the later use in the frontend. My recommendation would be to start only with the three known image types (original, detail, thumbnail) and to implement the feature with the additional image types in a later version (JoomGallery 4.1?). This would perhaps speed up the development of JoomGallery 4.0 and makes it easier to test the current version.
@Elfangor93 yes, I agree. Let's stay with know 3 image types and return to this feature later.
@MrMusic, @szepty-ziemi What about removing the add button in the GUI in the Configuration Manager >> General Settings >> Image Processing >> Image processing (static images) but leaving all the functionality in the code such that we can activate and test additional image types in a later version very easily? I really want to have the possibility to create multiple image types in the future.
@Elfangor93 I agree, this will be the easiest way
When testing:
* Different configuration settings
I encountered on an issue. I've created new image type "fix"
...
Please, advise.
Thanks @szepty-ziemi I was able to reproduce this issue. It happens when you create a new imagetype by just entering the image type name and save the configuration. If you would open the configuration and save it again the issue disappears.
I fixed the issue. @szepty-ziemi please confirm that the issue with the new imagetype "fix" is fixed now.
I also updated the testing template code in order for you to test the two methods "getImgPath" and "getCatPath".
@MrMusic, @szepty-ziemi What about removing the add button in the GUI in the Configuration Manager >> General Settings >> Image Processing >> Image processing (static images) but leaving all the functionality in the code such that we can activate and test additional image types in a later version very easily? I really want to have the possibility to create multiple image types in the future.
Yes, I agree too.
Since this PR is only about the service and not about the GUI, I will hide the Button in the next PR (#31).
@szepty-ziemi Can we merge this PR?
@Elfangor93 I will check everything after your fixes today. Will let you know ;)
ENV: https://prnt.sc/f-4vpeI2yH8p (this time tested on Linux)
When using this method:
I get an error:
All necessary input is provided correctly and works with previous methods. Please, advise.
ENV as above. Category structure: https://prnt.sc/D87R_2vkSISv DB: https://prnt.sc/Ht8L4FV2IWKf
I'm checking "Get Category path of existing image"
As far I understand it should be:
home/siristru/public_html/j4/images/joomgallery/originals/category-1/second-category/category-z
But I get:
And this is site root only.
@Elfangor93 I confirm that issue reported here https://github.com/JoomGalleryfriends/JG4-dev/pull/26#issuecomment-1199900494 was fixed 👍
I spotted no other issues. All seems to work correctly on Linux server... except those two issues reported above.
What is this service for
The FileManager service will be used to handle the files and folders created in the filesystem. I offers methods to perform processes (create, delete, check, move) on image files and folders. The file structure is created based on...
How to use this service
You can load the service anywhere in Joomla by doing
How to test this service
Make sure "Debug System" is "Yes" in Joomla Global configuration. Open the file
/administrator/com_joomgallery/src/View/Faulties/HtmlView.php
and insert the following code on line 62 afterthrow new \Exception(implode("\n", $errors)); }
Create a category using the category manager and give it the alias=. You can nest this category as you like below any other category already created. Note the id of the direct parent category of the new created category ().
Category Manager:
Create an image using the image manager. Select the category you just created (). Go into the database and edit your just created image record in the table #__joomgallery. In the row 'filename' write the filename as which you want the created files to be stored ().
Image Manager:
Database (#__joomgallery)
Navigate to Components->JoomGallery->Maintenance Manager to see the FileManager service running...
What to test
Different configuration settings
General Settings >> Image Processing >> Image processing (static images)
Different source images and destination categories
<YOUR_IMAGE.jpg>
(Different source images)<YOUR_FILENAME.jpg>
(Different filenames of the image)<YOUR_CATEGORY>
(Different categories - alias)<CATID>
(Different categories - id)<PARENT_CATID>
(Different parent categories - id)The service will create a folder structure and images in such a way as you defined it in your image entry and your category entries in the database (including nesting).
Different processing methods
Test the different methods from the service Available methods:
more infos: FileManager interface