Welcome Guest, Not a member yet? Register   Sign In
Announcing: Bonfire - a drop-in admin area
#21

You can try adding this example module https://github.com/dgvirtual/bonfire2-pages-module

And if it works, check for differences with yours.

Did you really remake 40+ modules of yours to conform to Bonfire2 requirements? Those go way beyond namespacing.
==

Donatas G.
Reply
#22

(This post was last modified: 12-28-2023, 12:42 AM by luckmoshy.)

(12-28-2023, 12:02 AM)dgvirtual Wrote: You can try adding this example module https://github.com/dgvirtual/bonfire2-pages-module

And if it works, check for differences with yours.

Did you remake 40+ modules of yours to conform to Bonfire2 requirements? Those go way beyond namespacing.

believe 100% I have those 40+ modules like your repo and all depend on bonfire systems

@dgvirtual    you have pointed that out exactly yes I have also used this module but does not work. this was my example if I was somewhere done wrong but nothing working at all until I use PSR4 I can use the bonfire2-pages-module
I don't know if you also checked on your side with that repo??? !!

it does not work on

PHP Code:
public $appModules = [
 
 
      
 
'App\Modules' => APPPATH 'Modules/Pages'
//does not work from https://github.com/dgvirtual/bonfire2-pages-module
 
    ];

https://github.com/dgvirtual/bonfire2-pages-module 


it works on

PHP Code:
public $psr4 = [
        
APP_NAMESPACE => APPPATH// For custom app namespace
        
'Config'      => APPPATH 'Config',
    
'App\Modules\Pages' => APPPATH 'Modules/Pages',
  
//and I can create, edit, and delete in Bonfire admin by  set group and permission
        
    
]; 
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#23

PHP Code:
 'App\Modules' => APPPATH 'Modules/Pages'

- you should not add Pages at the end. Leave it as in documentation:
Code:
 'App\Modules' => APPPATH . 'Modules', 
==

Donatas G.
Reply
#24

(This post was last modified: 12-28-2023, 04:11 AM by luckmoshy.)

(12-28-2023, 12:49 AM)dgvirtual Wrote:
PHP Code:
 'App\Modules' => APPPATH 'Modules/Pages'

- you should not add pages at the end. Leave it as documentation.
Code:
 'App\Modules' => APPPATH . 'Modules', 


Thank you, @dgvirtual After removing the pages, it is now working fine, and the same is true for all 40+ modules.  Did I use the wrong namespaces? Angel Confused Rolleyes
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#25

You can see in my example (and in the official docs of Bonfire) that for the automatic detection to work the module classes should be namespaced like this:

App\Modules\Modulename\[Controllers or Models or ...];

Good to know it works. Hopefully you can make them all work now.
==

Donatas G.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB