[BUG]: Get Snippets not working #1197

Open
opened 2024-12-14 20:28:45 +00:00 by mwweb · 1 comment

What Happened?

Attempting to import new snippets, and JCB just sits doing nothing, saying Getting available libraries
loading.....

Steps to reproduce the Bug

Go to JCB Dashboard, click on Snippets, then click on the Get Snippets button in the upper right corner.

Which Joomla version are you compiling in?

5.2.2

Which PHP version are you compiling in?

8.2.21

Which Joomla versions are you targeting?

5.x

Which PHP version are you targeting?

8.1+

Which Web server is JCB running on?

Apache/2.4.59 (Debian)

Which Relational Database is JCB running on?

11.4.2-MariaDB-ubu2404

Which OS is JCB running on?

Ubuntu 22.04.1 LTS

Which JCB version are you using?

v5.0.3

Where in JCB did this issue occur?

Snippet(admin_view), Snippets(admin_views)

On which browsers did you encounter the issue?

Firefox

Additional Comments

I'm unsure if this supposed to work in the current version, or whether it is still a work in progress.

Looking at developer tools in FireFox, under console there is the following error:

Uncaught TypeError: jQuery.get(...).success is not a function getLibraries http://{site]/administrator/components/com_componentbuilder/assets/js/get_snippets.js?50e431:81 <anonymous> http://[site]/administrator/components/com_componentbuilder/assets/js/get_snippets.js?50e431:16 jQuery 13 mightThrow process setTimeout handler*Deferred/then/resolve/< fire fireWith fire fire fireWith ready completed EventListener.handleEvent* <anonymous> <anonymous>

### What Happened? Attempting to import new snippets, and JCB just sits doing nothing, saying **_Getting available libraries loading....._** ### Steps to reproduce the Bug Go to JCB Dashboard, click on Snippets, then click on the Get Snippets button in the upper right corner. ### Which Joomla version are you compiling in? 5.2.2 ### Which PHP version are you compiling in? 8.2.21 ### Which Joomla versions are you targeting? 5.x ### Which PHP version are you targeting? 8.1+ ### Which Web server is JCB running on? Apache/2.4.59 (Debian) ### Which Relational Database is JCB running on? 11.4.2-MariaDB-ubu2404 ### Which OS is JCB running on? Ubuntu 22.04.1 LTS ### Which JCB version are you using? v5.0.3 ### Where in JCB did this issue occur? Snippet(admin_view), Snippets(admin_views) ### On which browsers did you encounter the issue? Firefox ### Additional Comments I'm unsure if this supposed to work in the current version, or whether it is still a work in progress. Looking at developer tools in FireFox, under console there is the following error: `Uncaught TypeError: jQuery.get(...).success is not a function getLibraries http://{site]/administrator/components/com_componentbuilder/assets/js/get_snippets.js?50e431:81 <anonymous> http://[site]/administrator/components/com_componentbuilder/assets/js/get_snippets.js?50e431:16 jQuery 13 mightThrow process setTimeout handler*Deferred/then/resolve/< fire fireWith fire fire fireWith ready completed EventListener.handleEvent* <anonymous> <anonymous>`
mwweb added the
Bug
label 2024-12-14 20:28:45 +00:00
Owner

Thank you for bringing this up. I want to share an update on the current progress and the new direction we're taking with JCB regarding content distribution, including Snippets.

The New SuperPower Implementation

jcb-future.jpeg

We are moving away from the current Snippets implementation to align it with the recently introduced SuperPower architecture. This approach significantly improves stability, scalability, and maintainability. Here's a high-level overview of how the new system functions:

  1. FieldTypes as a Model:

    • In the new system, areas like FieldTypes already utilize this approach.
    • Each FieldType now has three key actions:
      • Init: Pulls all FieldTypes from the global repository and initializes them locally.
      • Reset: Updates a specific FieldType by pulling its latest version from the global repository.
      • Push: Allows users to push their local changes to the global repository, facilitating collaboration.
  2. Repositories and Content Types:

    • A new Repositories feature enables users to create and manage repositories.
    • Supported content types include:
      • SuperPower
      • JoomlaPower
      • JoomlaFieldTypes
    • Depending on the selected content type, users can set up repositories that allow for pushing and pulling changes.
  3. Community-Driven Repositories:

    • Users can create their own repositories (e.g., for FieldTypes, SuperPowers, or JoomlaPowers), clone the global repositories, and maintain them independently.
    • This decoupled approach promotes collaboration, enabling community members to contribute back to the global repositories.

Snippets Migration

We plan to migrate Snippets to the SuperPower system to benefit from this new architecture. This migration will include the following features:

  • Snippets will be repository-based, similar to FieldTypes.
  • Users will be able to push their Snippets to a global repository after proper discussions and approvals.
  • A system of permissions will ensure contributors can collaborate effectively while maintaining quality control.
  • Tutorials will follow to guide users through the process of setting up repositories, managing content, and contributing to global repositories.

Advantages of the New System

  1. Stability and Scalability:

    • Decoupling content distribution from the database makes the system more robust.
    • By using repositories, users can better manage their data and updates.
  2. Flexibility:

    • Users can maintain their own versions of repositories and push updates to global repositories when needed.
    • Future areas such as fields, layouts, templates, site views, admin views, and even complete components will adopt this repository-based architecture.
  3. Decentralization:

Next Steps

We are finalizing the API implementation and integrating it into the architecture. Once stable, we will:

  1. Finalize individual areas in JCB (Snippets, fields, layouts, etc.).
  2. Create detailed tutorials to help users understand and use this new architecture.
  3. Announce the new features widely to the community.

This new repository-based content distribution system represents a significant step forward for JCB, providing Git-like functionality for managing and sharing component data.

Conclusion

The GetSnippets feature is part of a broader reimplementation effort to align with the new SuperPower architecture. While the existing system has limitations, the new approach will introduce enhanced stability, flexibility, and collaboration opportunities. We appreciate your patience as we continue to refine and deploy this new system.

If you have any further questions or suggestions, please feel free to reach out.

Thank you for bringing this up. I want to share an update on the current progress and the new direction we're taking with JCB regarding content distribution, including Snippets. #### **The New SuperPower Implementation** ![jcb-future.jpeg](https://git.vdm.dev/attachments/1832402f-f0d7-4cb0-b05c-6173d9a055c8) We are moving away from the current Snippets implementation to align it with the recently introduced **SuperPower** architecture. This approach significantly improves stability, scalability, and maintainability. Here's a high-level overview of how the new system functions: 1. **FieldTypes as a Model**: - In the new system, areas like **FieldTypes** already utilize this approach. - Each FieldType now has **three key actions**: - **Init**: Pulls all FieldTypes from the global repository and initializes them locally. - **Reset**: Updates a specific FieldType by pulling its latest version from the global repository. - **Push**: Allows users to push their local changes to the global repository, facilitating collaboration. 2. **Repositories and Content Types**: - A new **Repositories** feature enables users to create and manage repositories. - Supported content types include: - **SuperPower** - **JoomlaPower** - **JoomlaFieldTypes** - Depending on the selected content type, users can set up repositories that allow for **pushing** and **pulling** changes. 3. **Community-Driven Repositories**: - Users can create their own repositories (e.g., for FieldTypes, SuperPowers, or JoomlaPowers), clone the global repositories, and maintain them independently. - This decoupled approach promotes collaboration, enabling community members to contribute back to the global repositories. #### **Snippets Migration** We plan to migrate **Snippets** to the SuperPower system to benefit from this new architecture. This migration will include the following features: - Snippets will be **repository-based**, similar to FieldTypes. - Users will be able to **push** their Snippets to a global repository after proper discussions and approvals. - A system of permissions will ensure contributors can collaborate effectively while maintaining quality control. - Tutorials will follow to guide users through the process of setting up repositories, managing content, and contributing to global repositories. #### **Advantages of the New System** 1. **Stability and Scalability**: - Decoupling content distribution from the database makes the system more robust. - By using repositories, users can better manage their data and updates. 2. **Flexibility**: - Users can maintain their own versions of repositories and push updates to global repositories when needed. - Future areas such as fields, layouts, templates, site views, admin views, and even complete components will adopt this repository-based architecture. 3. **Decentralization**: - Decentralization for JCB is becoming a reality! - **Network Status**: [https://status.vdm.dev/status/jcb](https://status.vdm.dev/status/jcb) - **API Endpoint**: [https://api.joomlacomponentbuilder.com/v1/network/community/jcb](https://api.joomlacomponentbuilder.com/v1/network/community/jcb) - By decentralizing the system, we prevent a single point of failure. Multiple clones of the same dataset ensure availability and reliability. - Soon, this will be fully integrated into JCB, effectively achieving decentralization. [Huge calibration!] #### **Next Steps** We are finalizing the API implementation and integrating it into the architecture. Once stable, we will: 1. Finalize individual areas in JCB (Snippets, fields, layouts, etc.). 2. Create detailed tutorials to help users understand and use this new architecture. 3. Announce the new features widely to the community. This new repository-based content distribution system represents a significant step forward for JCB, providing Git-like functionality for managing and sharing component data. #### **Conclusion** The GetSnippets feature is part of a broader reimplementation effort to align with the new SuperPower architecture. While the existing system has limitations, the new approach will introduce enhanced stability, flexibility, and collaboration opportunities. We appreciate your patience as we continue to refine and deploy this new system. If you have any further questions or suggestions, please feel free to reach out.
Sign in to join this conversation.
No Milestone
No project
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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