Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 5.x #338

Open
wants to merge 321 commits into
base: 5.x
Choose a base branch
from
Open

Conversation

volha-pivavarchyk
Copy link

Q A
Bug fix? (use the a.b branch) [ ]
New feature/enhancement? (use the a.x branch) [ ]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #...

Description:

Replaces PRs #298, #308, #316

Steps to test this PR:

  1. Open this PR for testing locally (see docs on testing PRs here)

Robert Parker and others added 30 commits October 18, 2023 20:36
…t-items-request

Maut-10760: fix custom object field values for api request
Fixes for PHPStan & PHP CS Fixer
Remove PUT from the available item operations for the custom_objects endpoint
@volha-pivavarchyk
Copy link
Author

@volha-pivavarchyk were you able to merge in the changes from the staging branch? It should have the Github Action configuration in it. I don't see the CI jobs running on this PR.

Of course I can. I checked, there are a few conflicts. So I should be able to do it in the next few days. I apologize, sometimes I don't have time, so I don't respond immediately. If someone can do it faster, it's ok.

@volha-pivavarchyk
Copy link
Author

volha-pivavarchyk commented Sep 15, 2024

@mehransobhani Could you please check which branch do you use. The renderForm name of the method was used previously. Currently it's named renderFormForObject.

private function renderFormForObject(

And could you please check if there is a method renderForm in MauticPlugin\CustomObjectsBundle\Controller\ CustomObject\FormController. If so, could you please send me the code for this method so I can figure out what version of the class you have

@mehransobhani
Copy link

@volha-pivavarchyk
i now cloned the repository from https://github.com/acquia/mc-cs-plugin-custom-objects/tree/8de652b8c5ac9d25a38ea4a4f05b02722843cbf9
This is my first time installing this plugin, and after clearing the cache, I don't receive any errors, but Mautic becomes disabled as shown in the image below.
mautic

@escopecz
Copy link
Contributor

@volha-pivavarchyk

@escopecz Which way is better. Change in Mautic the timeline event name display (allow some tags to be displayed) or remove strong tags in CustomObject.

It should be fixed in Mautic using the|purify filter.

@madalingavanarescu
Copy link

I'm trying to get the acquia/mc-cs-plugin-custom-objects plugin working on Mautic v5.1.0 but keep encountering errors. Any suggestions or an estimated timeline for a fix?

@RCheesley
Copy link
Contributor

When this PR is tested and merged, it'll be compatible with the latest release, if you can help with testing / fixing issues reported, that will help move it along.

…filter value is "yesterday" and operator is "gt" for date field (acquia#359)

* Fix custom parameter date issue

* add more test case
@volha-pivavarchyk
Copy link
Author

@volha-pivavarchyk were you able to merge in the changes from the staging branch? It should have the Github Action configuration in it. I don't see the CI jobs running on this PR.

@escopecz I tried merging changes from the staging branch, resolved conflicts, then some tests were broken. To be honest, I did this week ago and haven't had time to fix all the broken tests. Just a few of them. Because it takes more than a few hours. I guess I won't be able to get back to it until two weeks from now.

But I didn't see any changes in the Github Action configuration after the merge. So maybe the settings are the reason why the CI job for the test is not running. For example, branch naming, PR from forks. Can anyone check these settings as I am unable to do so. If yes, we can run this job for these changes and add changes from staging later.

image

@volha-pivavarchyk
Copy link
Author

@escopecz I have fixed 4 more tests. But there are still failed tests after the merge. Fixing them will take time, as it's due to big updates in the staging branch, which are not in this branch. I won't be able to get back to it until a week and a half from now. Do I need to push the merge and commits with the fixed tests after merging? Or can this PR be without the merge in this branch?

@escopecz
Copy link
Contributor

@volha-pivavarchyk it doesn't seem that the merge was complete. The .github/workflows folder is missing from this branch.

I don't fully understand what you are saying. You shared a screenshot that the merge commit is in the history. I thought you pushed it but now I checked it's not pushed. So the GH Actions won't run. Why do you think you should not push it?

@volha-pivavarchyk
Copy link
Author

@escopecz I merged staging and fixed all tests. Works well for me. What next?

I apologize for my oversight. I thought that the workflows directory was in the project.

@escopecz
Copy link
Contributor

@volha-pivavarchyk great news! I triggered the build and there seem to be some issue. Can you take a look? I will test this once the CI is passing.

@volha-pivavarchyk
Copy link
Author

@escopecz I updated dependencies and workflow file (removed old php version and use new mautic version (v5.1)). Could you please trigger CI again.

@escopecz
Copy link
Contributor

Thanks! Triggered.

@iuriJorbenadze
Copy link

Simplified Guide: Installing Custom Objects Plugin for Mautic 5.1.1
This guide helps you set up the Custom Objects plugin with Mautic 5.1.1 using the latest compatibility updates, while simplifying the upload process.


Al following steps are done locally in your computer before you even go to mautic instance.

Step 1: Clone the Plugin and Apply Compatibility Changes

  1. Clone the staging branch of the Custom Objects plugin using Git Bash:

git clone -b staging https://github.com/acquia/mc-cs-plugin-custom-objects.git

  1. Go into the cloned folder:

cd mc-cs-plugin-custom-objects

  1. Add the upstream repository:

git remote add upstream https://github.com/acquia/mc-cs-plugin-custom-objects.git

  1. Fetch the changes from PR Update to 5.x #338 (Mautic 5 compatibility):

git fetch upstream pull/338/head:pr-338

  1. Merge the PR into your local staging branch:
git checkout staging
git merge pr-338

Step 2: Prepare the Plugin for Upload

  1. Archive the folder (mc-cs-plugin-custom-objects) into a ZIP file.
  2. Rename the ZIP file to CustomObjectsBundle.zip.

Step 3: Upload and Extract on Mautic Server

  1. Upload CustomObjectsBundle.zip to the plugins folder of your Mautic installation using SFTP or a file manager.
  2. Extract the ZIP file inside the plugins folder.
  3. Rename the extracted folder to CustomObjectsBundle.

Step 4: Install the Plugin in Mautic

  1. SSH into your Mautic server and navigate to the plugins directory
    or in file manager of your server just go to mautic installation directory and go to plugins folder.

cd your-mautic-path/plugins

IMPORTANT STEP: I had error 500, to fix it you need to manually run this command:

  1. Run the Mautic plugin installation command:

sudo /usr/bin/php your-mautic-path/bin/console mautic:plugins:install

o You should see output confirming that 1 plugin was installed.

  1. Clear the Mautic cache:

sudo /usr/bin/php your-mautic-path/bin/console cache:clear


Step 5: Verify Plugin Installation

  1. Log in to your Mautic dashboard.
  2. Go to Settings > Plugins and check if the Custom Objects plugin is listed and activated.

Final Notes
• If you encounter a 500 Internal Server Error after extracting the plugin, this is expected as Mautic needs to recognize the new plugin. It should be resolved after running the installation and clearing the cache.
• If you experience any issues, check the Mautic logs in:

your-mautic-path/var/logs/

After all this you will have CustomObjectsBundle running for Mautic 5 version.

@volha-pivavarchyk
Copy link
Author

@escopecz I fixed the problems after analyzing the cs fixer program. So far, three (cs, twig, phpunit) of the five tasks are working fine locally. Phpstan and rector failed. Do I need to fix all of them? Or is it possible to create a baseline for phpstan for example?

@escopecz
Copy link
Contributor

@volha-pivavarchyk yes, let's generate a baseline file for the PHPSTAN issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.