The pipeline is clear now. Please review and merge.
Thanks ☺️ !
mugesh.s → made their first commit to this issue’s fork.
The pipeline is clear now. Please review and merge.
Thanks ☺️ !
The pipeline is clear now. Please review and merge.
Thanks ☺️ !
Pipeline is clear now. Please review and merge. Thanks!
To fix this warning, we need to add a @param entry for $moduleHandler in the constructor docblock with the correct type and a brief description.
/**
* @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
* The module handler service.
*/
please review !
mugesh.s → made their first commit to this issue’s fork.
I have added translatability for the label, so now you can translate the login button. Please add this patch and try again, and refer to the image in the command.
Please review. Thank You!!
mugesh.s → made their first commit to this issue’s fork.
@chaitanya Dessai → Thanks
I’ve added GitLab CI and fixed the PHPStan and CSpell issues. Please review, apply PHPCS fixes, and then merge this request. Thank you!
mugesh.s → created an issue.
Hi @grumpydev74 → ,
Thanks for addressing this. 🙏 I’ve now added my alternative solution in the issue conversation. You can test it there.
Thank you!
Follow this 👉🏻 : https://www.drupal.org/project/views_infinite_scroll/issues/2852080 ✨ Different item count for 1st and other pages Needs review
Alternative Implementation
Hi all,
This approach provides another way to implement the feature without disturbing the current functionality.
Please review, test, and confirm if this works as expected.
I’ve also added test coverage to validate the behavior.
Issue Summary
This proposal adds a new “Page Control” feature to the Views Infinite Scroll pager plugin, allowing site builders to specify different item counts for:
- The first page
- All subsequent pages
This is useful in UX scenarios where the first page of a listing (e.g., landing pages or featured sections) should show fewer or more items than the rest.
Proposed resolution
- ntroduce a checkbox
Enable Page Control
in the pager settings. - When enabled:
- Hide the existing
Items per page
field. - Show two new number fields:
Items for the first page
Items for the other pages
- Modify internal pagination logic to:
- Set per-page limits conditionally based on current page.
- Adjust offset and total count logic accordingly.
- Update
getRemainingItems()
andgetNumberItemsLeft()
methods to reflect accurate counts. - include
#states
logic in the options form for dynamic field visibility.
User interface changes
A new checkbox and two conditional number fields will be shown in the Views UI under the pager settings.
Example Use Case
For example, I want to display only 4 items on the homepage (page 0), but load 2 items on all other pages. This feature enables that flexibility without needing to override views programmatically.
Video Demonstration
Here’s a working demo of the feature implemented on my site:
→
→
This feature has been implemented in the branch:
2852080-Add-Page-Control
A patch has also been attached here for testing.
✅ Please review and test the patch and merge request.
💬 Feedback and suggestions are most welcome!
mugesh.s → made their first commit to this issue’s fork.
Please review and test the patch and MR
. Feedback is welcome!
mugesh.s → created an issue.
mugesh.s → made their first commit to this issue’s fork.
I've added GitLab CI and fixed PHPCS issues. Please review and merge. Thank you!
mugesh.s → created an issue.
Note: Using configuration file /builds/issue/signature_field-3533081/web/modules/custom/signature_field-3533081/phpstan.neon.
Line src/Plugin/Field/Element/Signature.php
13 Class Drupal\signature_field\Element\Signature extends deprecated
class Drupal\Core\Render\Element\FormElement:
in drupal:10.3.0 and is removed from drupal:12.0.0. use
\Drupal\Core\Render\Element\FormElementBase instead.
55 Call to deprecated method renderPlain() of class
Drupal\Core\Render\Renderer:
in drupal:10.3.0 and is removed from drupal:12.0.0. Use
\Drupal\Core\Render\RendererInterface::renderInIsolation() instead.
Line src/Plugin/Field/FieldWidget/SignatureWidget.php
254 Call to deprecated method renderPlain() of interface
Drupal\Core\Render\RendererInterface:
in drupal:10.3.0 and is removed from drupal:12.0.0. Use
\Drupal\Core\Render\RendererInterface::renderInIsolation() instead.
259 Call to deprecated method renderPlain() of interface
Drupal\Core\Render\RendererInterface:
in drupal:10.3.0 and is removed from drupal:12.0.0. Use
\Drupal\Core\Render\RendererInterface::renderInIsolation() instead.
1. Class Inheritance Deprecation
File:Signature.php
Line:13
Problem:
Your class extends `FormElement`, which is deprecated.
Solution:
Change the parent class from `FormElement` to `FormElementBase`.
How to fix:
// ...existing code...
use Drupal\Core\Render\Element\FormElementBase;
// ...existing code...
class Signature extends FormElementBase {
// ...existing code...
````
---
2. Deprecated Method: `renderPlain()
`
Files:
- Signature.php (Line 55)
- SignatureWidget.php (Lines 254, 259)
Problem:
`renderPlain()` is deprecated.
Solution:
Use `renderInIsolation()` instead.
How to fix:
// ...existing code...
// $output = $renderer->renderPlain($build);
$output = $renderer->renderInIsolation($build);
// ...existing code...
````
// ...existing code...
// $output = $this->renderer->renderPlain($build);
$output = $this->renderer->renderInIsolation($build);
// ...existing code...
````
Summary:
- Change `FormElement` to `FormElementBase`.
- Replace all `renderPlain()` calls with `renderInIsolation()`.
mugesh.s → created an issue.
Until the maintainer accepts the merge request, use this patch.
Azure login redirect module is used to automatically redirect users to the Microsoft login page when they access the site.
Using this patch, it's working for me:
Drupal 10.4.6
PHP 8.2.28
Google Analytics Reports 4.0
Analytics Data 0.22.2.
Please use this module to update the refresh token.
https://www.drupal.org/project/refresh_token_validity_extension →
mugesh.s → created an issue.
@avpaderno → Thank you for the clarification! I understand that the second and third arguments for $this->formatPlural() should be literal strings rather than concatenated strings or values returned by a function/method. I will ensure to use explicit strings like '1 item' for the singular form and '@count items' for the plural form in my implementation.
If you have any further suggestions or examples, please let me know!
@avpaderno → Thank you for reviewing. I have made the changes you mentioned on this branch (1.0.x).
Please let me know if I need to do anything else. All is fine; please change the RTBC status. Thank you.
@avpaderno → Thank you for reviewing. I have made the changes you mentioned on this branch (1.0.x).
@Vishal Kadam → Thank you for reviewing. I have made the changes you mentioned on this branch (1.0.x).
Thank you for your information. You can review the project now
mugesh.s → created an issue.
mugesh.s → made their first commit to this issue’s fork.
Thank you for your contribution.
I've tested @vandana's MR as a patch and it works.
I have reviewed your post and contributions in the account.
Issue : This issue clearly depends on the Update Manager module when using both the Update Manager and Admin Toolbar together
To reproduce the issue in Drupal 10.4.2 or above:
- Administration > Extend : Enable Admin Toolbar , Admin Toolbar Extra Tools and Update Manager
- Structure > Menu > Administration , Click edit menu
Root cause :
File path :web/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php : line 489 and 501
- Drupal 10.4.x does not have the update.theme_install route name, while it was there in Drupal 10.3.x. and below
- The error encountered is due to the condition
if (version_compare(\Drupal::VERSION, '11.0.0', '<')).
solution :
Change the condition if (version_compare(\Drupal::VERSION, '10.4.0', '<'))
to make it work.
Hi @kushagra.goyal
This issue is encountered in Drupal versions lower than 11, I faced it in 10.4.0. After installing the module, navigating to the admin menu (/admin/structure/menu/manage/admin) resulted in this error. When applying the patch the issue got fixed and might work only in versions lower than 11.
- Add the patch and clear the cache
drush cr
mugesh.s → created an issue.
I am trying to implement the Twitter API, but I encountered a blank block. I checked and debugged the code, and this is the result I got
file path (socialfeed/src/Plugin/Block/TwitterPostBlock.php)
Does this Twitter API only work with the Basic Plan?
I am referring to the site https://twitteroauth.com/ and using API v2. I only get the 'user/me' endpoint; other GET routes are available on the Basic Plan. Could you please clarify this issue?
I changed the code at the path socialfeed/src/Services/TwitterPostCollector.php to use the getPosts function
$this->twitter->setApiVersion('2');
return $this->twitter->get('users/me');
#3 worked for me as well , solution to problem in pathauto after upgrade site drupal 9 to drupal 10.