Open stpaultim opened 4 years ago
From Gitter.im chat:
In my initial use case, the "security" would be less important than the practicality of automatically hiding/showing content and related menus based on the combination of the currently logged in user (the same user across all urls - technically just 1 BD site), and the current base url. That should determine what appears in menus, and whether an entity (node, user profile, taxonomy term, etc.) would be accessible or not. Based on normal cookies and perhaps "SSO", one may switch the base url without logging out/in and then get access to content/etc.that "belong there".
Amongst other benefits, this is a a way to organize content and avoid information overload by separating it contextually into "(sub-) domains / multiple domains", while still just maintaining 1 site/installation.
This may also be seen/used as "multiple communities in one".
I am also using Domain Access on my Drupal 7 website:
I would love to see them ported to Backdrop CMS...
Palante Technology Cooperative will pay bounty on a functional module port!
Moving a client to Drupal 9, in part because they need this module. I'm a little nervous about the amount of work involved in porting this one.
We might give it a try. If anyone wants to collaborate on this one, let us know - having some help would motivate us.
I have a D7 site that I don't want to port to D8 or D9, but would like to port to Backdrop that uses Domain heavily. I'm interested in being a part of the team that ports it to BackDrop.
I'm also interested in helping port of this module. I could use this module for my sites as well.
Out of interest, I ran it through Coder Upgrade. No joy. Results are here: https://github.com/yorkshire-pudding/domain
It causes a white screen Fatal error just adding the line (modified for Backdrop path) to settings.php
, though there is at least a stack trace that may be useful.
require_once BACKDROP_ROOT . '/modules/domain/settings.inc';
I would be happy to collaborate.
Similar to @LeeteqXV (comment) , I would also be interested in a lighter version that was simply about providing a different theme and different menu to different domains but with the ability to share some content.
There seems to be some momentum here. How do we keep this going? I think a good next step would be for someone with the necessary skills and knowledge to skim through the code and try to estimate how difficult this module will be to port, identify the sticking points, and/or if we'll need any specific skills or knowledge to get the job done.
Is there some work going on?
@mrlch I'm not aware of anyone working on. Perhaps, if you're interested we could have a round table discussion at the next Backdrop Live (22nd-23rd September 2023) to discuss what the blockers are and try to get a bunch of people working on it.
I did a bit more work to get past the fatal error. Still loads of other issues with it. Parked again for now.
@yorkshire-pudding could you check your latest work into Github? I found your Domain repository but its last update was in April. I'd like to put some work in on this. Thanks
@DarrellDuane I'll push where I got to tomorrow and ping you here
@DarrellDuane Thanks. If you need help testing, I'm supportive and will try to encourage others to help out as needed. There has been interest in this module for a long time. I have taken clients to Drupal 9, because this module was not available for Backdrop. It would be great to get this one ported.
@DarrellDuane @stpaultim @argiepiano
I've added it to Backdrop contrib to make it better for collaboration. It really needs several maintainers and will need several people to help get it over the line to a first release.
@DarrellDuane - you don't yet seem to be a member of the contrib group yet. I suggest when you've made some progress, add a PR and then apply here to join contrib. -
https://github.com/backdrop-contrib/domain
I've opened up the wiki and we should probably consider getting all the D7 documentation into there before it goes.
@DarrellDuane - did you make any progress on this? We haven't yet - see https://github.com/backdrop-contrib/domain/issues/4
FYI - my team has been making slow progress on this module that we hope to share shortly. We're busy with too many things right now.
OK, there is some public progress on this module. We have got minimal features working for a client site that we are still working on. It's still got lots of bugs. But, it's far enough along that folks should feel free to jump in and help test it, report bugs, AND even better, to submit PR's.
@stpaultim @argiepiano @mrlch @LeeteqXV @DarrellDuane @yorkshire-pudding @mr-simba I have been working on this for almost a month. now I can finally deliver this module working, I know that I always have some details in my migrations, but it has worked for me, from this moment on I will need your help to continue solving errors that may exist, I have invested my free time in this. Feel free to review and correct errors that may exist. The repository has two branches, one for 7.x drupal and the other for backdrop 1.x, it will help us to compare changes..This is the repository.. https://github.com/rudy880719/domain
That's great, @rudy880719! I'll try to take a look soon.
Thank you for your efforts @rudy880719 . We had started work at https://github.com/backdrop-contrib/domain but it may well be that you have got further than we have. I'll look to test soon Maybe we can merge what you've done, but if not, and if yours works better, I think we would be happy to shelve what we've done and bring in your Backdrop branch to be primary.
I will take a look as well.
I hope that you at least tried our version of the module, I think it was pretty close to ready. But, as @yorkshire-pudding has said, we can easily replace our repo with your own.
We have a site using a hacked version of the module. We can try replacing our hacked version with yours and see how it works.
@rudy880719 I have started to test your port of the domain access module and it appears to be working. I have opened an issue in your repo just to start the ball rolling. I'll have to fork your repo to contribute. Thanks.
@izmeez @argiepiano @stpaultim @yorkshire-pudding thanks for your comments, I had tried the module that @yorkshire-pudding and @stpaultim have been building, but some things weren't working, that's why I wanted to help, my apologies for creating my own repository, as I said before, feel free to help in the documentation and text references to drupal, and with any code errors you detect, you have more experience than me in backdrop, I will always appreciate your suggestions and teachings. I would just like to be included as a contributor to the module, that will help me on my curriculum, since I am currently looking for part-time job.
@rudy880719 I'm not sure how the two projects will be merged or swapped. I will have to leave that to @yorkshire-pudding and @stpaultim to suggest. I have not tried either of the ports before today and just tried your first because you seem pretty confident in your work. I will fork your repo to contribute my findings while we see what other suggestions come forth.
@rudy880719 Have you just ported the main domain module or have you also been working on the accompanying modules?
@izmeez I ported all the modules that are in the repository, domain alias, domain config, domain content, domain nav, domain settings, domain source, domain theme, and domain stric
I provided a PR to @rudy880719 's port to update several Install, Readme and documentation files. The PR changes could be applied to the other port. The big challenge is how to merge or decide on the two ports?
@izmeez Can you please provide me the steps that you followed for the new module that @rudy880719 provide, because for me it is not working. I have tested this on a fresh backdrop installation. After creating posts for different domains, neither of them is accessible from both domains for anonymous users. It shows Access Denied. I have also faced this error on every page load.
Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration.
I have followed the new INSTALL_QUICKSTART.txt
steps that you have made here https://github.com/rudy880719/domain/issues/3
@sudipto68 For the error you must include the domain module settings file in the settings.php. Something like that include './modules/custom/domain/settings.inc'; Regarding content access for users, you must first rebuild permissions, remember that for anonymous users to be able to view content, this must have the add to all affiliates option checked.
@rudy880719 Yes. I added the path that is included in the INSTALL_QUICKSTART.txt in the settings.php file. But still the error was showing. I will try the all affiliates option, I did not checked that I only checked the domain in which i wanted to show the post.
@sudipto68 The route depends on where the domain module is, it is not always the same route
@sudipto68 I have only just started testing the module. I am wondering if this discussion should be in a new issue in the github repo for the module @rudy880719 created since it is specific to that module? After adding the line to settings.php file, I only enabled the main module and on the Backdrop status report page there is a link to rebuild permissions. There are notes on access by anonymous and authenticated users.
I have done some initial testing but still getting "Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration." despite confirming with Xdebug that the file (domain/settings.inc
) is being included.
Not really sure what it happening and I don't have time for a deep dive at present. I was going to suggest we move to a branch (e.g. 1.x-3.x-rudy) on the current backdrop-contrib repo and add you as a co-maintainer. @stpaultim @rudy880719 - what do you think? If we get this working better than the current branch, we can rename branches and make this one default.
I started testing yesterday night and I got the same issue. Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration.
Thank you for your effort to all of you.
@mrlch @yorkshire-pudding Could you tell me what version of Backdrop you used, and version of php
@mrlch @yorkshire-pudding Could you tell me what version of Backdrop you used, and version of php
@rudy880719 Latest release of Backdrop (1.29.0) and PHP 8.1 (modern but not cutting edge)
@yorkshire-pudding @mrlch I don't know what happens, everyone gets the same error, however I try to replicate the error and I can't. I attach a video of how everything works for me
https://github.com/user-attachments/assets/f0363463-c182-46da-b4cf-6de5625b3721
Could be that you are hard-coding the contrib
folder -- it's not guaranteed that everyone will use that.
@laryn In which folder is Backdrop supposed to put the modules that are downloaded? The path is supposed to vary depending on where the user downloaded the module.
@laryn In my case I put the module inside the contrib folder, that's why I put that path in the settings.php, each user should put the specific path depending on where they put the domain module
It is working fine for me.
When I create or edit a domain there is an error
https://example.com/modules/domain/tests/200.png is not responding as expected and may not be configured correctly at the server level. Server code 0 was returned.
On testing it appeared to be working so in the domain edit settings I checked Ignore server response warning
and continued.
When I switch to a subdomain the site title changes as expected. After setting user permissions including for content types and with three levels of users, I am able to have authenticated user create post that is visible to anonymous user on that specific subdomain only. On other subdomains there is an "Access denied" error. Personally, I think that should be "Not found".
@rudy880719 Backdrop 1.29.0 PHP 8.2 and 7.4
@rudy880719 Yes. In my case, I have also placed my modules inside the contrib folder and I have used the path based on this. still It is not working for me. I have followed your video and I think I am doing the same but I am getting the error that I have mentioned before.
@laryn In which folder is Backdrop supposed to put the modules that are downloaded? The path is supposed to vary depending on where the user downloaded the module.
@rudy880719
By default, Backdrop just puts all downloaded modules directly into modules
but placing inside a contrib
or custom
folder is an acceptable way of splitting. I have the path for my installation and the file is included (I tested with xdebug) but something else is not working.
The offer is still there that we can move this as a branch of the contrib project:
I was going to suggest we move to a branch (e.g. 1.x-3.x-rudy) on the current backdrop-contrib repo and add you as a co-maintainer. @stpaultim @rudy880719 - what do you think? If we get this working better than the current branch, we can rename branches and make this one default.
I don't think this works any better than what we have though is obviously working for some for an unknown reason so maybe we're not far away from having a working version
The suggestion to add a branch 1.x-3.x-rudy
could be a good path forward.
Having the old drupal 7.x branch in the repo really doesn't add much and makes cloning cumbersome because the 7.x branch is the main one and isn't really needed as all the commits are already in the repo to start with.
Having both ports as branches will make it easier to compare and cherry pick. I saw the backdrop-contrib/domain
port already has new work on Backdrop blocks for domain.
All of the quickstart and readme changes can be merged and improved.
This module gives rise to a lot of interesting settings discussions and implications. So, does all this belong in the wiki? Currently it's all in readme's in each of the main and submodules and each of those contain multiple url links to discussions and ideas on using domains and cases as affiliates. On the wiki it may be easier to access and organize?
I'm just starting to focus my thoughts on domain. Previously, I've been invested with groups access and taxonomy access. The whole domain thing, I was aware of but on the side and not something I spent much time with. There are issues that may arise to improve the use. The wiki may be the place for it. I guess it's a bunch of dreary copy paste.
Meanwhile, I think I'll go ahead and open another issue on the other port since that's the one I'm testing and that is working for me in dev on php 7.4.x
If the other port is added as a branch the issues can be opened at https://github.com/backdrop-contrib/domain/issues instead.
Name of the module, theme, or layout Domain Access
Link to the drupal.org module, theme, or layout https://www.drupal.org/project/domain
(Optional) Link to an issue in the drupal.org queue asking the Drupal community if anyone is working on a Backdrop port of this project https://www.drupal.org/project/forum_access/issues/3070491
(Optional) Bounty https://github.com/backdrop-ops/contrib/issues/400#issuecomment-738575348
Other This seems like it could be a pretty big project. I post the request, because I've had a couple of people ask about this module. It's come up in the forum at least three times and today it came up in Gitter chat.
https://forum.backdropcms.org/forum/does-backdrop-have-some-functionality-similar-domain-access-module
https://forum.backdropcms.org/forum/domain-access-equivalent
https://forum.backdropcms.org/forum/multiple-domains-pointing-same-site-how
Maybe there could be a light weight version for Backdrop CMS?