Possible bug with adding domains to users?

Discussion in 'General' started by Elayne, Jan 25, 2016.

  1. Elayne

    Elayne Member

    Hello,
    I've noticed that after enabling the following option "Use the domain limits in client module to add new domains" through System -> Main Config -> Domains, now that i go to the user CP and click on Add website button, i have nothing to choose on the domain option, it is a dropdown menu but I am not able to choose from anything, it's just white space. Before going to the add website option, i've added myself the domain to that current web user through my admin user and its showing in the zones of the web user.
    I've added the domain through template in the zones for adding domains, i didn't create a new zone. Is it required to create new zone for each domain? Also another question, is it possible to use explode/implode functions or something like that to remove visibly the dots in the DNS manager?
    Three suggestions:
    1. Could it be simplified from user point the adding a domain process?
    For example they should be allowed to add domain only that have the nameservers configured of the system. After adding lets say domain.com and domain213.org, he would be able to choose from a dropdown menu which domain records to edit. It's too complicated for users at the moment.
    2. Maybe we could be able if it isnt that hard to control which buttons the user to see in the menu from the left?
    3. About the message system perhaps it would be great if the users gets a warning somewhere around the panel when he receives an answer and also it could be really handy if it was manageable like creating groups/categories to escalate a problem, but this actually turns into integrated ticket system so i guess this is too much to ask.
    Thank you for the great work, keep it up!
    Best regards!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The domain limit feature exists to add a limit that clients can't add websites or DNS records when the admin has not preapproved that domain. So the feature des exactly what it should do by preventing that you added a website that was not approved. When you use the domain limit, then the admin has to login to ispconfig first and add the domain in the client module for this client. After he has done that, the client can select this domain for his website or DNS record.
     
  3. Elayne

    Elayne Member

    Well yes, i get that, but after reading my post again i noticed i didn't really explained the problem that well. I'll try again..
    I've added lets say userdomain.com to user hank, so i relogin as hank, I go to Sites button, I click on Websites from the left menu, then I choose Add new website, then when I want to choose the domain userdomain.com, the dropdown is empty. I'm currently looking at the php files trying to find why it's breaking the if check and considers that there isn't any added domain, but I got a little lost, because I can't find from which file the function getDomainModuleDomains() is getting called... :D

    I attached a pic for more detailed info.
     

    Attached Files:

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I just tested it here with 3.0.5.4p8 and there is no issue in the code, works like it should.

    1) Enabled the domain module as admin user under System > Interface config.
    2) Created a new client "test" in the client module
    3) Added a domain "test.tld" for the client test in the client module.
    4) Logged in as client "test", the domain test.tld shows up in the select field when I add a new website.

    You should check in ISPConfig that the domain that you added is really assigned to the right client and that you did not add this domain as website already befre you activated the domain module as a website can exist only once with the same domain name.
     
  5. Elayne

    Elayne Member

    Yes, I'm doing the exact same thing. I tried with template for Domain only and the rest are made in the Default zone template. I'm more than sure that the domains are assigned to that user because when i enter his account normally (without admin login), I'm seeing the domains listed in the zones. Then I go to add new website and the dropdown is empty. I've set the domain limit to 6 if this makes any difference. Where should I be looking for the problem?
    var_dump(); for $domain & $domains variables are returning empty results:
    array(0) { } - $domains
    NULL - $domain
    Can you tell me where can I find the function getDomainModuleDomains(); ?

    Edit ====================== Edit:
    Found the function, but it was totally useless that I found it... i should've start with the table domain in the DB... well it's empty, now I have to find out why it's empty.. :D
     
    Last edited: Jan 29, 2016
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    When it is empty then you chave not added the domain yet. Login as admin, go to the client module, there you find an entry "domains" in the left menu where the domains for the domain limit get added. I guess you mixed up a dns zone and the domain limit domains.
     
  7. Elayne

    Elayne Member

    Jesus Christ, never saw that button down there... I apologize for the taken time. :)
    I have been mixing them up, I thought adding a zone, adds Domain as well for the user.
    Is it possible to be added within the zone assignment for specific user? (with 3.1 ver. ISPConfig?). I think this automatic process won't break anything, even more, it's going to be useful? :)
     
    Last edited: Jan 29, 2016
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    That's not possible as zones can get added by the user himself, so if a zone would add a domain to the domain limit then the user would be able to add all kind of domains again. There is a bug in 3.0.5.4p8 though that the dns zones dont get limited in the same was the websites get limited by the domain limit and this has been fixed.
     
  9. Elayne

    Elayne Member

    Actually I guess you're right, won't be that good. I would really like to hear what do you think about the idea that I wrote in the 1st comment:
    1. Could it be simplified from user point the adding a domain process?
    For example they should be allowed to add domain zones only if the domain they are adding have the nameservers configured of the server. After adding lets say domain.com and domain213.org, he would be able to choose from a dropdown menu which domain records to edit.

    But to be able to enable/disable this check for the NS servers.
     
    Last edited: Jan 30, 2016
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    It is planned to add a wizard that works similar to the DNS wizard for creating new domains and the wizard createds the website, email domain, postmaster mailbox, ftp user etc. in one step.

    Many domain registries require that you setup the dns server first before they allow to register the domain or switch the dns to a new server. so you would not be able to register a domain there when the changed dns settings in the domain are a prerequisite to add the dns record in ispconfig.
     

Share This Page