magento2 – Add module to Magento Marketplace – where can I find their official tester utility

I intend to add my first module to Magento marketplace.

While reading the documents they say that in the first step the module will go into a first automatic test phase using their utility and they encourage people to download this script and test before application. But the link provided is not working.

Anyone know how can I get it ?

Thanks !!!

Getting error after updating module masquerade 8.x-2.0-beta3 to masquerade 8.x-2.0-beta4

After updating to module masquerade 8.x-2.0-beta4 in case of logging in with SSO i.e. simplesamlphp i am getting this error whenever trying to masquerade –

     Call to undefined method DrupaluserEntityUser::setAccount() in simplesamlphp_auth_user_logout() (line 68 of /var/www/html/modules/custom/simplesamlphp_auth/simplesamlphp_auth.module)

With masquerade 8.x-2.0-beta4 – This error is not coming when logging in using credentials.

Also error is not coming with masquerade 8.x-2.0-beta3 in any case whether logging in via SSO or credentials.

I am not able to figure out whether it is issue due to this new version or not?

Thanks in advance!

Write an algorithm with module and draw a flowchart with module

Thanks for contributing an answer to Computer Science Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

8 – How to use the TWIG variables of the stores in a custom module?

On my Drupal 8.9 site I have the Drupal Commerce model.

I created a custom module to create new pages in the store path.

I also created TWIG pages in my custom module.

How to use the TWIG variables of the stores in a custom module?

For example in the TWIG of a store :

commerce-store–professionnel–full.html.twig

I can print the store type with this variable :

{{ store_entity.type.entity.label }}

But in the TWIG of my custom module, it doesn’t work.

8 – Override page.html.twig with custom module template

I want to override the page.html.twig template from a custom module. I know how to create a suggestion, but I would like it to find the template file in my custom module.

function promo_accc_theme_suggestions_page_alter(array &$suggestions, array $variables) {
    $suggestions() = 'page__promo__accc';
}

I’m not sure what I would need to do from here to get Drupal to look in /custom/modules/promo_accc/templates.

scoping – Functions inside a Module

I personally would not define the function locally, but rather use pure functions as arguments, e.g.

g(m_, n_, f_) := {f(m, n), f(m + 1, n)}
g(p, q, #1 + 2 #2 &)
(* {p + 2 q, 1 + p + 2 q} *)

However, you can also do something similar to what you are proposing. However, this only works if the x argument is an unambiguous function of m and n.

g(m0_, n0_, x0_) := Module({f, m = m0, n = n0},
  f = Function({m, n}, x0 /. {m0 -> m, n0 -> n});
  {f(m, n), f(m + 1, n)}
  )
g(p, q, p + 2 q)
(* {p + 2 q, 1 + p + 2 q} *)

The problem with your definition has to do with the way Function({arg}, body) is parsed. The symbol arg needs to appear literally in the body part. Compare e.g.

body = x^2;
f = Function({x}, body);
f(anything)
(* x^2 *)

python – Module Error: No Module Named ‘py.io’ Pytest Pycharm

You can get more details here.

I just tried to make a simple pytest file. In terminal, everything works fine. However, when I try running it in Pycharm it gives me ‘ModuleNotFoundError: No module named ‘py.io”.enter image description here I have the pytest package installed. enter image description here And my default test runner is pytest.enter image description here I have tried reinstalling Pycharm, but it still didn’t work.

magento2 – What’s the best way to add css to vendor module?

I download via composer a module and I need to add some CSS to it.
What’s the best way to add that css? Adding to my theme, extending the module css and add more css there? I’ve seen some ways but what’s the best one?

If it is extending how to I extend css it? Do I need to override the whole css file or I can add, for example, a custom.css to it in my app/code or app/design?

Thanks 😀

Do we have an option to change/override the drupalsettings variable which is defined by some other module through our custom module?

Do we have an option to change/override the drupalsettings variable which is defined by some other module through our custom module ?

Here: by drupalsettings, I am asking about the Drupal behaviors variable.

magento2 – Can’t get rid of class from deleted module

I created a module, which I later deleted.
The homepage of my site loads, and my categories page loads, but my products pages don’t load.

I get an error saying

1 exception(s):
Exception #0 (ReflectionException): Class CompanyModulenameModelProductAttributeFileUpload does not exist

That module doesn’t exist. I’ve searched the entire project, and nothing that looks like that class exists.

I’ve delete var/viewpreprocessed, var/cache, var/page_cache, pub/static/frontend, pub/static/adminhtml, generated.

I’ve run setup/upgrade, setup:di:compile, setup:static-content:deploy -f, and c:c/c:f multiple times, and removed the record of the module from the db entirely, but it’s changed nothing

Any other ideas?

Thanks