Unable to install the demo module extend-user

Hey,

I’m trying to install this demo module:

If i follow the readme i’m supposed to call 2 commands from root folder of the project:
composer config repositories.oxid-esales/extend-user vcs https://github.com/OXID-eSales/extend-user-demo-module.git
composer require oxid-esales/extend-user:dev-master

I get the following error:
The requested package oxid-esales/extend-user could not be found in any version, there may be a typo in the package name.

If i try to clone the repo in /source/modules/oe/extenduser directory I see the module in the administration part but when i enable it i get the following error under installed shop modules:
Invalid modules were detected. Do you want to delete all registered module information and saved configurations?

module ID: extenduser
problematic files: \OxidEsales\Eshop\Application\Model\User\UserUpdatableFields::class => \OxidEsales\ExtendUser\UserUpdatableFields::class

I must be missing something obvious/simple or?

Hi,

three questions:

  1. Which server do you use to run your shop installation?
  2. What shop version do you run?
  3. What do you want to achieve when installing this module?

Cheers

Hey,

Not sure what you mean by server so i’ll list the info i think could be relavant. If you need other info please let me know

  1. 16.04.1-Ubuntu, PHP Version 7.0.15, Apache/2.4.18 (Ubuntu)
  2. Community Edition 6.0.0-rc.1
  3. I want to use it as a learning tool, modify it, break it, fix it,… to learn the basics of module development.

I saw some tutorials, most of them for the old 4 version, and i thought a simple demo module like this one would be a good start learning module development. If you know of some useful literature in english, that would also be great.
I’m also reading “OXID eShop developer documentation Release 1.0.0” and some things are explained there. I might also go just making my own module from scratch, but i thought it could be easier to start from a working code and learn from that and then make my own module.

Cheers!

Alright, got it.

Look, the point is that V4 is stable, V6 is about to be rolled out, so we are still about writing the documentation, adapting modules for it, preparing tutorials etc. V6 is available as RC now: https://oxidforge.org/en/oxid-eshop-v6-0-0-rc1-is-published.html

This announcement also contains a link to a “quick port” of existing modules (other tutorials not ready yet) and describes how to install it. RC also contains the paypal module - maybe this is a first starting point for you. You may also find a lot of “How to write a module…” on OXIDforge. Basically, these tutorials for V4 shall still work as there is a BC layer running in V6.

Although I just got it installed (yes, very first time for me, shame…) on my scotch box, I highly recommend to use oxvm instead.

Cheers!

thank you for a fast response.

I also checked V4 at first, installed it and played arround a bit, but when i saw V6 will soon be coming out, I figured by the time i learn how to expand it and write modules that do something useful, V6 will be stable.

I am at the moment already using the RC version that you linked and i also tried following the oxvm installation, but did not manage to get it up and running. The installation on the linux machine worked and the site itself works.

I understand it is still early in the V6 lifecycle and I’m not expecting all resources to be ready at this point, was just wondering if there is already something out there, that i was not able to find that could help me get started.

Will go step by step and make the module from scratch and see where it breaks i guess.

Hey guys, me again…

I’m trying to get the basic module up and running and I keep hitting wall after wall…
I was following THIS document for the module structure,…
And I started with this tutorial.

I see the module on the list of modules, but when I click on activate i get the following error (again/still)

Invalid modules were detected.
Do you want to delete all registered module information and saved configurations?

extenduser
OxidEsales\Eshop\Application\Model\User\UserUpdatableFields => OxidEsales\ExtendUser\UserUpdatableFields

If I comment out the extend section in metadata.php then i get no error here, but the database column is also not created (as if the onActivate method is not called)…

Am I doing something wrong, are there any useful resources that could help me? It feels horrible to be stuck with such a basic thing as this basic module that should just have 2 functions for database migrations up and down, and then adding one field to a model…

Thanks for any help.

Hi @flynorc,

best would be to show the code for the module, maybe on GitHub so some helpful souls could have an eye on it.

Cheers

Hey Marco,

Thank you for your response. It is the example module that gives me that error. And the same error i also get if I just make some parts of the module following the instructions linked in the previous post. I’m guessing there is some error with referencing the classes, but since i’m very new to oxid i can just try a bunch of things, not knowing why they are failing…

I wanted to take it easy and just add one field to the oxusers table, and display that field in the general form. I started with the metadata.php file, then the ModuleEvents.php then I added the 2 classes to extend UserUpdatableFields class and then the template which should be inserted/added to the existing form.

I didn’t make a repo out of it because it was pretty much a subset of the demo module with some names changed. And I do get the same error with the demo module so maybe there is also the same mistake there?

Cheers!

1 Like