Closed Elfangor93 closed 1 year ago
Categorie form view is not working.
Error:
The requested page can't be found.
Image Single View with warning:
Image form view is not working.
Error:
The requested page can't be found.
In List of categories it is not possible to "add new category"
Notice:
Categorie form view - not possible to safe new category
Error:
The requested page can't be found.
I keep getting this warning several times for almost all points: _Warning: Attempt to read property "owner" on bool in /xampp/lampp/htdocs/Joom4_Leer/administrator/components/comjoomgallery/src/Service/Access/Base/AccessOwn.php on line 127
But the images or categories are also listed.
I keep getting this warning several times for almost all points: _Warning: Attempt to read property "owner" on bool in /xampp/lampp/htdocs/Joom4_Leer/administrator/components/comjoomgallery/src/Service/Access/Base/AccessOwn.php on line 127
But the images or categories are also listed.
@reni68 This Warning comes if your asset table in the DB is not correctly set up. Reinstalling the Component will fix that. Deinstall and then new Install.
List of images - Category selection does not work ( all available images are displayed )
In the backend, the views tags, configs and faulties no longer work. The images view is always displayed. The backend views images and categories views work normally.
In frontend the error 'Class "Factory" not found'
appears when the single image view is called.
Issues in Tags, Configuration Set and Maintenance. Images will always present. As mentioned above.
How can I uninstall JG4 now? Delete all tables of JG4 in DB? What else?
How can I uninstall JG4 now? Delete all tables of JG4 in DB? What else?
@AlexanderSupp If you use wampserver you could switch to a php version below v8.0.0. Otherwise apply changes in PR #128 or PR #129 . As soon as one of this PR is merged I can add the changes to this PR...
@Elfangor93 thanks. I changed to 7.4.x , install the last main, and uninstalled it. All JG4 tables were deleted. I hope the code is also clean. Then I switched back to php 8.0.26. Now I wait until this pr is ready for test.
After first superficial tests, it looks good. I think that's a good basis for further development. Of course there are e.g. with a save still errors like this: Fatal error: Declaration of Joomgallery\Component\Joomgallery\Site\Controller\ImageformController::edit() must be compatible with Joomla\CMS\MVC\Controller\FormController::edit($key = null, $urlVar = null) in C:\wamp64\www\Joomla\components\com_joomgallery\src\Controller\ImageformController.php on line 308
I will deepen further tests. I discovered a few more errors during multiple upload, which I would like to investigate separately and only report afterwards. Thank you in the meantime.
Multiple Uploads with Nmb parallel processes = 8 will not work.
Nmb parallel processes = 1 will work correct.
I think this is the old bug in the code.
Multiple upload works perfectly.
I have created 2 categories and uploaded 6 images to each category.
However, when viewing the images in the backend, filter options are ignored. All images are always displayed.
But sometimes it works if I adjust something on an image, for example, approve it.
Displays tested in the frontend:
category list
image list
Other things I could not test yet :(
I keep getting this error now: Warning: Attempt to read property "owner" on bool in /xampp/lampp/htdocs/Joom4_Leer/administrator/components/com_joomgallery/src/Service/Access/Base/AccessOwn.php on line 127
Wanted to uninstall, but that ended with error. Then installed the JG4-dev-fix-deinstall.zip. With this I could uninstall without error. After reinstalling JG4-dev-MVC-frontend.zip but still again this error.
I keep getting this error now: Warning: Attempt to read property "owner" on bool in /xampp/lampp/htdocs/Joom4_Leer/administrator/components/com_joomgallery/src/Service/Access/Base/AccessOwn.php on line 127
@reni68 Can you please provide me more information on how to reproduce this issue. Because I dont get it. Please provide me with the following info such that I can fix it. https://github.com/JoomGalleryfriends/JG4-dev/tree/main#steps-to-reproduce-the-issue
Fatal error: Declaration of Joomgallery\Component\Joomgallery\Site\Controller\ImageformController::edit() must be compatible with Joomla\CMS\MVC\Controller\FormController::edit($key = null, $urlVar = null) in C:\wamp64\www\Joomla\components\com_joomgallery\src\Controller\ImageformController.php on line 308
@AlexanderSupp Can you please provide me with more infos on that error. What do I have to do to get this error, because I dont get it.
Here is the flow:
Category Form View - Root / In the first screen Edit is active.
I click to Categories and the following screen will appear.
I click the edit action in the Reisen category.
And now I clicked save.
A similar situation is if I click the delete action.
List of Categories
Rio shows 64 images, but Click to Rio
List of Images
Select first image.
Select Edit
Change Author and then SAVE
Returned to List images
Checked in
And everything is OK
Category Form View
Starts with the page "Add"-function or the last used function "Edit".
Expected start with the "View"-Page. A click to Categories display the correct page.
But if I select "+ Add new Category" and if I was previous in "Edit", the Edit-Page will come up. At this point, I have no chance to switch to another dialogue within Category Form View.
Function: Delete a Category Result: Delete successful but Error Message "Check-in failed with the following error:" displayed with no more information. May be also a checked-in problem?
List of Categories produced a warning, if you select the status unpublished and there are no unpublished categories available.
Backend - Images - Select Category does not work
Backend - Images - How can I approve several images? Issue?
List of Categories
If a Category has no images (and) a subcategory has no images, then "No elements in this category..." will be displayed.
@reni68 Can you please provide me more information on how to reproduce this issue. Because I dont get it. Please provide me with the following info such that I can fix it.
@Elfangor93 I found out today that this only occurs when I install the "sampledata" with. If I create my own categories and upload images myself, the errors do not occur in the frontend! Now I test first of all with fresh code further :-)
The multiple upload works perfectly. I have created 2 categories and uploaded 6 images to each category and 2 images uncategorized. The filter options in the backend do not work. All images are still displayed.
My system: Linux, XAMPP, Joomla 4.3.3, PHP-Version 8.0.15
Everything related to the category filter in the images view I have to shift to another PR. This heavily relates to how the images view should actually work. Do we wanna have it like in the JG3 or more like we have it in the backend? But this is a discussion I dont want peform here...
Category view currently only shows images which are published, approved and not hidden. We still have to decides about possible settings for the frontend views and where we wanna place them. But also this is not a discussion I dont want peform here. This will be part of a next PR...
Category Form View Starts with the page "Add"-function or the last used function "Edit".
Sorry. But I don't get what you wanna tell here in this comment.
Backend - Images - How can I approve several images? Issue?
No issue. Function just not yet available.
@reni68 Can you please provide me more information on how to reproduce this issue. Because I dont get it. Please provide me with the following info such that I can fix it.
@Elfangor93 I found out today that this only occurs when I install the "sampledata" with. If I create my own categories and upload images myself, the errors do not occur in the frontend! Now I test first of all with fresh code further :-)
@MrMusic Probably you have to update the asset table and the reference to the asset table in the sample data such that the methods from the access service work again.
Probably you have to update the asset table and the reference to the asset table in the sample data such that the methods from the access service work again.
I would recommend not to use the sample data any more. It was only an interim solution as long as the multiple upload did not work. With the multiple upload now you have better control over if everything works.
Administrator - Images I can't reach my unapproved images any more.
In Backend images and empty categories are not displayed anymore...
List of images - Category selection does not work ( all available images are displayed )
Yes the Category selection does not work yet. But this will not be implemented within this PR since this depends heavily on how the images list view in the frontend should actually work.
I have tested all views ✅ successfully. Also category selection is working now...
I have tested all views ✅ successfully. Also category selection is working now...
I can confirm this :-)
I tested
Category View List of Categories List of Images Single Image View
✅ successfully
To familiarize myself with the views i did something with category view default.php and inserted the following code in line 114 for the thumbnail:
<img src="<?php echo JoomHelper::getImg($image, 'thumbnail'); ?>" class="figure-img img-fluid rounded" alt="<?php echo $image->imgtitle; ?>" style="width:auto;" itemprop="image" loading="lazy">
Is this the right way apart from the class?
I have not found any more errors, only a small "unsightly" behaviour with the "Filter Options": The 'Filter Options' are always folded out when you click on 'Clear'. In Joomla itself, the options are collapsed when you click on 'Clear'. However, there is nothing to stop merging this PR.
@reilldesign Looks good for me. Thanks.
@reilldesign Yes, exactly. The JoomHelper::getImg() is returning you the URL to a specific image/imagetype.
/**
* Returns the URL or the path to an image
*
* @param string/object/int $img Filename, database object, ID or URL of the image
* @param string $type The image type
* @param bool $url True to return an image URL, false for a system path (default: true)
* @param bool $root True to add the system root to path. Only if $url=false. (default: true)
*
* @return mixed URL or path to the image on success, false otherwise
*
* @since 4.0.0
*/
public static function getImg($img, $type, $url=true, $root=true)
In the first argument, you select the image record for which you need an image URL. You can provide here an image object as you did or if you dont have that an image ID or even a filename. In the second argument, you select the type of image you want the URL for. The image type has to be available for this image. Image types can be added and configured in the configuration manager in the backend. This image types allows you to create fancy designs with exactly the image size and crop/section you need.
This PR updates the frontend and the corresponding MVC pattern. The following views are now available in the frontend:
The templates for the list and form views are more or less copied from the backend. The templates for the image and category view are still very primitive since this PR focuses on the MVC pattern and not on the templates.
It is not the goal of this PR to create beautiful views, but to provide the data and functionality needed in the views with the help of the frontend MVC pattern. The router and the breadcrumbs do not work in this PR either. This will also be added in a later PR.
Test instructions
Flip trough the views and try to perform the provided actions. Report any error, warnings and notices.
Important
Please create a new comment for each issue found within this PR!