[BUG]: Error when you Save a Library as Copy #1162

Closed
opened 2024-08-16 08:54:41 +00:00 by Oh · 4 comments

What Happened?

Saved a Library as Copy and got the following Error in J3 & J5:

  • J3: Call to undefined method ComponentbuilderModelLibrary::generateUniqe()

  • J5: Call to undefined method VDM\Component\Componentbuilder\Administrator\Model\LibraryModel::generateUniqe()

Steps to reproduce the Bug

  1. Go to a Library and try to Save as Copy

  2. Following Error comes up:

Screenshot from 2024-08-16 10-33-41
Screenshot from 2024-08-16 10-30-42

Which Joomla version are you compiling in?

v3.10.12 & v5.1.2

Which PHP version are you compiling in?

v8.0.30 & v8.2.18

Which Joomla versions are you targeting?

v3.10.12 & v5.1.2

Which PHP version are you targeting?

v8.0.30 & v8.2.18

Which Web server is JCB running on?

Apache/2.4.59 (Debian)

Which Relational Database is JCB running on?

MariaDB 11.3.2

Which OS is JCB running on?

Ubuntu Desktop (24.04)

Which JCB version are you using?

v3.2.3-beta4 & v5.0.2-beta4

Where in JCB did this issue occur?

Library(admin_view)

On which browsers did you encounter the issue?

Firefox

Additional Comments

No response

### What Happened? Saved a Library as Copy and got the following Error in J3 & J5: - **J3:** `Call to undefined method ComponentbuilderModelLibrary::generateUniqe() ` - **J5:** `Call to undefined method VDM\Component\Componentbuilder\Administrator\Model\LibraryModel::generateUniqe()` ### Steps to reproduce the Bug 1. Go to a Library and try to` Save as Copy` 2. Following Error comes up: ![Screenshot from 2024-08-16 10-33-41](/attachments/1f680bd2-8a6a-439c-886a-12c8853a8045) ![Screenshot from 2024-08-16 10-30-42](/attachments/8ca234ca-4433-432f-bf2d-45395c1dc297) ### Which Joomla version are you compiling in? v3.10.12 & v5.1.2 ### Which PHP version are you compiling in? v8.0.30 & v8.2.18 ### Which Joomla versions are you targeting? v3.10.12 & v5.1.2 ### Which PHP version are you targeting? v8.0.30 & v8.2.18 ### Which Web server is JCB running on? Apache/2.4.59 (Debian) ### Which Relational Database is JCB running on? MariaDB 11.3.2 ### Which OS is JCB running on? Ubuntu Desktop (24.04) ### Which JCB version are you using? v3.2.3-beta4 & v5.0.2-beta4 ### Where in JCB did this issue occur? Library(admin_view) ### On which browsers did you encounter the issue? Firefox ### Additional Comments _No response_
Oh added the
Bug
label 2024-08-16 08:54:41 +00:00
Owner

Hmm please take a closer look at this, since the code is there in the class, maybe because its protected. Can you test what happens if its a public method?

Hmm please take a closer look at this, since the [code is there](https://git.vdm.dev/joomla/Component-Builder/src/commit/2fab51f611ca004245a8c96ec249e5e587c9c3c5/admin/src/Model/LibraryModel.php#L1211-L1231) in the class, maybe because its protected. Can you test what happens if its a public method?
Author

There seems to be a typo in the method name, should be generateUnique() instead of generateUniqe()

$data['name'] = $this->generateUniqe('name', $data['name']);

There seems to be a typo in the method name, should be generateUniq`u`e() instead of generateUniqe() https://git.vdm.dev/joomla/Component-Builder/src/commit/29fef2cbea2595ad82e7381dab60090d810af1ec/admin/src/Model/LibraryModel.php#L1179
Member

@ohrionmartin please validate if you are still getting this issue. I have tested it on my local system using the latest JCB v5.0.3-alpha3 and it seems to be fixed. So if you could please validate that, so we can close this issue.

image

@ohrionmartin please validate if you are still getting this issue. I have tested it on my local system using the latest JCB [v5.0.3-alpha3](https://git.vdm.dev/joomla/pkg-component-builder/releases/tag/v5.0.3-alpha3) and it seems to be fixed. So if you could please validate that, so we can close this issue. ![image](https://git.vdm.dev/attachments/aa09b3c8-f942-4706-854a-58d4afecdd0d)
Author

I can confirm that the issue has now been fixed, we can go ahead & close it!

I can confirm that the issue has now been fixed, we can go ahead & close it!
Oh closed this issue 2024-08-30 08:22:19 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1162
No description provided.