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

Broken on Craft Pro 3.7.31 and newer #7

Open
DynamiteGoesBoom opened this issue Feb 9, 2022 · 18 comments · May be fixed by #9
Open

Broken on Craft Pro 3.7.31 and newer #7

DynamiteGoesBoom opened this issue Feb 9, 2022 · 18 comments · May be fixed by #9

Comments

@DynamiteGoesBoom
Copy link

DynamiteGoesBoom commented Feb 9, 2022

Hello there!

First of all, thank you for creating this plugin! However, it looks like the Collapsing/Expanding functionality no longer works on Craft Pro 3.7.31. I can use the Select All toggle to select all of the matrix blocks, but neither the Collapse or Expand functionality works. Also the Set Status doesn't work either. It's likely due to how Craft updated the selectors or something recently.

Update

I have confirmed rolling Craft back to 3.7.30 corrects the issue. So the issue is certainly with 3.7.31 of Craft.

it's also broken on Craft 3.7.32 as well :(

Thanks again for the help!

@DynamiteGoesBoom DynamiteGoesBoom changed the title Broken on Craft Pro 3.7.31 Broken on Craft Pro 3.7.31 and newer Feb 10, 2022
@bencresty
Copy link

bencresty commented Feb 27, 2022

Confirmed here (using Craft 3.7.34 and Matrix Toolbar 1.0.6). Collapse doesn't do anything. No issues mentioned in the console.

Hopefully this could get some attention! Without this functionality it's pretty difficult to work with huge matrix fields with long blocks!

Thanks in advance!

@davidsprinz
Copy link

Having the same problems here. Would love to see a fix! Thanks in advance, this is a very helpful plugin.

@mattbloomfield
Copy link

Same issue!

@brandonkelly
Copy link

brandonkelly commented Mar 13, 2022

Just PR’d a fix for this (#9). You can use it in your project by adding this to composer.json:

{
  "minimum-stability": "dev",
  "prefer-stable": true,
  "require": {
    "...": "...",
    "monachilada/craft-matrixtoolbar": "dev-fix-7"
  },
  "repositories": [
    {"type": "git", "url": "https://github.com/brandonkelly/craft-matrixtoolbar.git"},
  ]
}

@brandonkelly brandonkelly linked a pull request Mar 13, 2022 that will close this issue
@DynamiteGoesBoom
Copy link
Author

Thanks @brandonkelly but I'm not able to get the your plugin into the project.

I have this in my /cms/composer.json:

require: {
"monachilada/craft-matrixtoolbar": "dev-fix-7 as 1.06",
},
"repos": [
    {
      "type": "git",
      "url": "https://github.com/brandonkelly/craft-matrixtoolbar.git"}
  ],

I even tried it without the as 1.0.6 and keep getting this error:

Problem 1
    - Root composer.json requires monachilada/craft-matrixtoolbar dev-fix-7, found monachilada/craft-matrixtoolbar[dev-master, 1.0.0, ..., 1.0.6] but it does not match the constraint.
    - ```

Yet if I take the contents of https://raw.githubusercontent.com/brandonkelly/craft-matrixtoolbar/75774566f8401b2ca79ecf61ae6ca5a4d983a271/src/resources/matrixtoolbar.js and paste that into the `cms/vendor/monachilada/craft-matrixtoolbar/src/resources/matrixtoolbar.js` file then it works.

Clearly I'm not doing something correct even after nuking the `vendor/` and `composer lock` file and `composer install`.

What else can I try?

@brandonkelly
Copy link

The as 1.06 is not required.

You probably need to add the following though:

{
  "minimum-stability": "dev",
  "prefer-stable": true,
}

@DynamiteGoesBoom
Copy link
Author

Ahh it looks like for w/e reason the JS updates made got wiped some how. Having a case of the Mondays 😹

@DynamiteGoesBoom
Copy link
Author

@brandonkelly I'm not sure what's happening now, but composer is having issues finding your patch:

composer.json

{
  "name": "hybridinteractive/fido",
  "description": "Fido is a Craft 3 CMS scaffolding project...for now",
  "version": "0.0.2",
  "require": {
    "craftcms/aws-s3": "1.3.0",
    "craftcms/cms": "3.7.38",
    "craftcms/feed-me": "4.5.0",
    "craftcms/mailgun": "2.0.1",
    "craftcms/redactor": "2.10.6",
    "dukt/videos": "2.1.0",
    "fostercommerce/craft-snipcart": "1.5.7",
    "fruitstudios/linkit": "1.1.12.1",
    "hybridinteractive/craft-position-fieldtype": "1.0.17",
    "hybridinteractive/craft-width-fieldtype": "1.1.0",
    "mmikkel/retcon": "2.4.1",
    "monachilada/craft-matrixtoolbar": "dev-fix-7",
    "nystudio107/craft-eagerbeaver": "1.0.4",
    "nystudio107/craft-fastcgicachebust": "1.0.10",
    "nystudio107/craft-imageoptimize": "1.6.44",
    "nystudio107/craft-minify": "1.2.11",
    "nystudio107/craft-retour": "3.1.71",
    "nystudio107/craft-seomatic": "3.4.30",
    "nystudio107/craft-templatecomments": "^1.0.0",
    "nystudio107/craft-typogrify": "1.1.19",
    "nystudio107/craft-vite": "1.0.24",
    "pennebaker/craft-architect": "2.4.3",
    "percipioglobal/craft-colour-swatches": "1.5.1",
    "putyourlightson/craft-blitz-recommendations": "1.3.0",
    "supercool/tablemaker": "2.0.1",
    "topshelfcraft/wordsmith": "3.3.0.1",
    "vaersaagod/matrixmate": "1.4.2",
    "verbb/cloner": "1.2.2",
    "verbb/field-manager": "2.2.4",
    "verbb/formie": "dev-craft-3 as 1.5.4",
    "verbb/icon-picker": "dev-craft-3 as 1.1.12",
    "verbb/super-table": "2.7.1",
    "vlucas/phpdotenv": "^3.4.0",
    "workingconcept/craft-cloudflare": "1.0.1",
    "yiisoft/yii2-redis": "^2.0.6"
  },
  "repos": [
    {
      "type": "git",
      "url": "https://github.com/brandonkelly/craft-matrixtoolbar.git"
    }
  ],
  "prefer-stable": true,
  "minimum-stability": "dev",
  "require-dev": {
    "yiisoft/yii2-shell": "^2.0.3"
  },
  "autoload": {
    "psr-4": {
      "modules\\sitemodule\\": "modules/sitemodule/src/"
    }
  },
  "config": {
    "optimize-autoloader": true,
    "sort-packages": true,
    "platform": {
      "php":  "7.3"
    },
    "allow-plugins": {
      "yiisoft/yii2-composer": true,
      "craftcms/plugin-installer": true
    }
  },
  "scripts": {
    "craft-update": [
      "@pre-craft-update",
      "@post-craft-update"
    ],
    "pre-craft-update": [
    ],
    "post-craft-update": [
      "@php craft install/check --interactive=0 && php craft clear-caches/all || exit 0",
      "@php craft install/check --interactive=0 && php craft migrate/all || exit 0",
      "@php craft install/check --interactive=0 && php craft project-config/apply || exit 0"
    ],
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
      "@php craft setup/welcome"
    ],
    "pre-update-cmd": "@pre-craft-update",
    "pre-install-cmd": "@pre-craft-update",
    "post-update-cmd": "@post-craft-update",
    "post-install-cmd": "@post-craft-update"
  }
}

Yet while running composer update I get this:

Screen Shot 2022-04-26 at 11 15 46 AM

Do you have any pointers?

Thanks!

@brandonkelly
Copy link

brandonkelly commented Apr 28, 2022

@DynamiteGoesBoom sorry! My composer.json example had a typo. repos should have been repositories.

@DynamiteGoesBoom
Copy link
Author

DynamiteGoesBoom commented Apr 28, 2022 via email

@DynamiteGoesBoom
Copy link
Author

@brandonkelly When I made that repositories change I started receiving this strange error:

Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
When working with _public_ GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+30009d24e5f0+2022-04-28+1843 to retrieve a token.
This token will have read-only permission for public information only.

I haven't ran into this previously and not sure why that's happening.

Thanks for any insight on this and the help with the patch is really helpful!

@brandonkelly
Copy link

brandonkelly commented Apr 28, 2022

@DynamiteGoesBoom Probably due to a rate limitation on the GitHub API. Did you try following the instructions in that message?

@DynamiteGoesBoom
Copy link
Author

DynamiteGoesBoom commented May 3, 2022

@brandonkelly Yeah I did. I've never ran into this issue with any other repos before so I'm sort of at a loss on this one :/

After adding a token I receive this error:

Screen Shot 2022-05-03 at 3 36 20 PM

Any ideas on why that new error appears?

@bencresty
Copy link

@DynamiteGoesBoom @brandonkelly Just tested it here too, but eventhough I don't get to see the errors as shown above here, the plugin still doesn't work.

It's sad, because 'collapse all' and 'expand all' are basic features IMO that cannot be missed as we're working with lots of blocks per page and it's a lot of work to select them all only to collapse or open them.

@brandonkelly would it be possible to, instead of having a plugin for this basic functionality, include these features for matrix blocks standard in Craft 4? I wouldn't expect these features to be very difficult to implement, but they add so much to the user control. And then we don't have the issue of this developer not reacting anymore solved too! That would be great!

Going to remove this plugin from all our projects here now tho, as this developer obviously doesn't responded for a while now. Hope he/she/they are all good tho.

@bencresty
Copy link

For future reference: just added a discussion to implement the 'Collapse all' and 'Expand all' to the core of Craft 4: craftcms/cms#11531

@DynamiteGoesBoom
Copy link
Author

@brandonkelly Is there any update on this plugin? Like @bencresty said this would be an excellent core feature for Craft. I'd like to think that it wouldn't be too crazy to implement either.

Thanks again for all that you and the team does to make our lives that much easier :)

@brandonkelly
Copy link

@DynamiteGoesBoom Not my plugin so 🤷🏻

You can follow along at craftcms/cms#11531 for any updates pertaining to this making it into Craft.

@DynamiteGoesBoom
Copy link
Author

Thanks @brandonkelly I'm following that thread now and thanks 👍

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 a pull request may close this issue.

5 participants