Account created on 23 April 2007, about 17 years ago
#

Recent comments

🇳🇱Netherlands nk_

Image field formatters also generate unique ID. I asked if you can confirm that in your case all have unique ID? Including nested ones? Or some have very the same?

🇳🇱Netherlands nk_

Good, so I would like to mark this issue as postponed. In the meantime, I would not be much surprised if things would work in your case as long as every Swiper has unique ID attribute, meaning parent and nested ones. Did you check on that?

🇳🇱Netherlands nk_

Also, you might have more than actual, or valid swipers, in the object containing multiple swipers

swipers[]

or that is as much as it should be but some are malfunctioning. You could also maybe put

console.log(swipers)

at the specific place and inspect and/or share here what's there. See screenshot.

🇳🇱Netherlands nk_

I took a quick look into your export but couldn't find anything like "suspicios". Can you make a screenshots of Development console in browser where we can see html/markup of all swipers on the page?

🇳🇱Netherlands nk_

@abhishek_gupta1 thanks, I will definitely include this in the next version.

@RgnYLDZ
1. Are you by chance loading swiper main js in a "strange" way?. Like somewhere in html.twig template or similar and not part of formatter (and views style)
2. I assume you did try in a few different browsers with a clean cache?
3. Are all swiper instances made by View, or? some yes some not? can you export the view in yml and share by chance?

🇳🇱Netherlands nk_

No problem, glad if I can help. My first thought may be - is there anything (contrib or custom module or theme) in your environment that is extending StylePluginBase or even SwiperFormatterStyle instance (this in some kind of custom code)?

🇳🇱Netherlands nk_

That make sense indeed. I am currently busy with a new release, with CKEditor5 included, once I am there I will do my best to include this option as well. In the meantime any patches welcome. Additional code would require schema update, default settings and the Swiper entity form changes at least.

🇳🇱Netherlands nk_

That's a weird error because base class' method is protected indeed. I took a quick look for 10.2 and 8.8 versions:
https://git.drupalcode.org/project/drupal/-/blob/10.2.x/core/modules/vie...
https://git.drupalcode.org/project/drupal/-/blob/8.8.x/core/modules/view...

So what's your version of Views/Drupal core?

🇳🇱Netherlands nk_

I can't reproduce this, everything works normal in my case and there is "on" method available for Swiper object. Error does not make sense to me since a line before checks on swiper instance existence.

Is there any other (preceding) JS errors in console?
Which browser is used?
Do you load Swiper from local path or from remote CDN?

I just pushed a tiny change (swiper event type) into dev version but I doubt that's the cause. Would you be able to test that? It would be very appreciated, if it works for you especially to test breakpoints with different pagination type, e.g. one to be dynamic bullets and the other fraction.

🇳🇱Netherlands nk_

It's published as beta4 release so you can use that as well. Make sure you run DB update script too, as explained here Breakpoints feature Needs review .

🇳🇱Netherlands nk_

Thanks! Patched and pushed for < PHP 8.3 compatibility.

🇳🇱Netherlands nk_

This is just released in 2.0.x branch. Please check out this issue: https://www.drupal.org/project/swiper_formatter/issues/3441764 Breakpoints feature Needs review which shall stay as the only one related to this feature for the time being. Closing as duplicate.

🇳🇱Netherlands nk_

Thanks! Finally I was able to grab some time to include this property too. It is enclosed in the new 2.0.x version, just released. Please also check out this issue about Breakpoints feature: https://www.drupal.org/project/swiper_formatter/issues/3441764 Breakpoints feature Needs review partially related.

🇳🇱Netherlands nk_

This is just released in 2.0.x branch. Please check out this issue: https://www.drupal.org/project/swiper_formatter/issues/3441764 Breakpoints feature Needs review which shall stay as the only one related to this feature for the time being. Closing as duplicate.

🇳🇱Netherlands nk_

This is just released in 2.0.x branch. Please check out this issue: https://www.drupal.org/project/swiper_formatter/issues/3441764 Breakpoints feature Needs review which shall stay as the only one related to this feature for the time being. Closing as duplicate.

🇳🇱Netherlands nk_

Thanks, this is indeed a good find, I don't think we ever tested image-on-paragraph situation like you explained. A bug was due the fact that Paragraphs have plural for it's bundle key - paragraphs_type. I did commit and push a fix, tested previously into 1.0.x-dev version, appreciated if you give it a test. I also added this into 2.0.x-dev version previously and pushed.

🇳🇱Netherlands nk_

Thanks for this one too, it is included in the latest 2.0.x-dev version. See also here.

🇳🇱Netherlands nk_

Thank you so much for a great work on this one, as well as mousewheel Mousewheel support Needs review . I've tested both on 2.0.x version and just pushed it.

Version 1.0.x got some (important like) changes meanwhile so I assume patch won't work but we might consider re-rolling.

🇳🇱Netherlands nk_

Thank you all! It was finally committed in the new release , the last one supporting Drupal 8.8 and 9. A brand new branch 2.0.x with quite some new features is there and recommended for a future use.

🇳🇱Netherlands nk_

Thank you all! It was finally committed in the new release , the last one supporting Drupal 8.8 and 9. A brand new branch 2.0.x with quite some new features is there and recommended for a future use.

🇳🇱Netherlands nk_

Thank you all! It was finally committed in the new release , the last one supporting Drupal 8.8 and 9. A brand new branch 2.0.x with quite some new features is there and recommended for a future use.

🇳🇱Netherlands nk_

Thank you all! It was finally committed in the new release , the last one supporting Drupal 8.8 and 9. A brand new branch 2.0.x with quite some new features is there and recommended for a future use.

🇳🇱Netherlands nk_

Thank you so much @Amirez, you rock!

🇳🇱Netherlands nk_

Thanks! It was almost there, I made some changes, take a look into dev version that is just pushed. Most important change is forgotten Drupal\Core\Routing\RouteMatchInterface inclusion, without it php error is thrown and help page is broken.

🇳🇱Netherlands nk_

This shall not be the case, the module was tailored and tested on the platform that involves multiple events and thousands of entities (Speakers, Sessions, Exhibitors etc.) as well as a big group of most of the field types provided by Swapcard. There we are using it so for almost a year and never experienced this issue. I might be able to help but please provide me with more info.

  • What kind of field it is? A custom field? Dropdown, or textfield or?
  • If this is an options field type (e.g. select/dropdown) does it have key|value definitions on Swapcard? Our module syncs that too so in case it is this sort of field please check if those options (assuming existing on Swapcard) are also synced in Drupal?
  • Are you sure that you actually did populate that field with at least one single value, at least at one Session?
  • Did you try some options in the Debug section at the bottom of the module's config form?
  • For debugging it's good to check in Swapcard's Graphql explorer here: https://developer.swapcard.com/tools/explorer
  • Whatever does not show there will not in Drupal as well.
🇳🇱Netherlands nk_

As for Breakpoints you mentioned, see here how you can easily implement it:
https://www.drupal.org/project/swiper_formatter/issues/3318311#comment-1... 💬 Responsive breakpoints Needs work

🇳🇱Netherlands nk_

Never put assets directly in Twig/HTML, this is for what you have libraries in Drupal.

Your best bet, very standard Drupal way for the situation when you want library literally everywhere, and that it does not multiply and conflict is this

/**
 * Implements hook_page_attachments_alter().
 */
function YOUR_MODULE_NAME_page_attachments_alter(&$page) {
   
   /* Attach this library just everywhere, with no config on pages/scopes where is normally triggered. */
   
   // If you use default, CDN current version
   $page['#attached']['library'][] = 'swiper_formatter/remote';
   
   // OR remove previous line and have this one uncommented, if you are using local version.
   // $page['#attached']['library'][] = 'swiper_formatter/local';
 
}

Or you can also try something like
{{ attach_library('swiper_formatter/remote') }}
in your twig (page.html.twig or html.html.twig) but I really do not recommend this.

🇳🇱Netherlands nk_

Make sense, so I pushed to dev just now. Please take a hint and report back, thanks :) Not that, in general, you could also have a unique twig/html template, based on swiper template id.

🇳🇱Netherlands nk_

I am not sure what you mean exactly, but of course there is a formatter for a regular image field. See attached screenshot.

🇳🇱Netherlands nk_

This is a feature request and I could perhaps think of implementation if there's enough interest by community. Also, I'd prefer to have Views fieldsets module stable in Drupal 10. Previously there a few more important implementations on my to-do list, such as making CKEditor5 plugin for Drupal 10.

🇳🇱Netherlands nk_

Thank you! I just pushed a new release 1.0.6 that contains fix. I'd appreciate if you get a chance to test it and report back.

🇳🇱Netherlands nk_

Thanks for reporting. This has been fixed and pushed into dev, see here 🐛 Multiple swiper views in one page Fixed
It would be great if you could test on it and report back so I make sure to push a new stable version including that fix.

Production build 0.69.0 2024