Skip to main content

Question regarding order in which dynamicui files get loaded and applied

Comments

5 comments

  • cPRex Jurassic Moderator
    Hey there! I reached out to the UI team about this and there wasn't a consensus on how those would be loaded. I've created a case for the team to research this behavior, but I can't say for sure how long it will be before I hear back on that. I can say for sure that the latter items will override previous items. I'll be sure to update this thread once I get more details.
    0
  • sangeeths
    Hey there! I reached out to the UI team about this and there wasn't a consensus on how those would be loaded. I've created a case for the team to research this behavior, but I can't say for sure how long it will be before I hear back on that. I can say for sure that the latter items will override previous items. I'll be sure to update this thread once I get more details.

    Thanks a ton, would really appreciate clarity on this and looking forward to it.
    0
  • sangeeths
    @cPRex correct me if I'm wrong anywhere in the following bits and apologies in advance if I'm pasting code that's not meant to be pasted. So, I did some perusing of the cPanel code and found this in our /usr/local/cpanel/Cpanel/DynamicUI/Loader.pm
    : This seems like part of the logic of processing custom dynamicui files (let me know if that's not the case) and it seems like the files are being processed by cPanel based on the listing returned by the readdir
    function. And after checking docs/googling, it seems like the order in which the listing is returned is platform-dependent. In our case, we stumbled on an ordering issue again and after toying around with file names and other parameters, the precedence seems to be based on mtime
    of the files (i.e, the latest wins) on our v98 CentOS installation. But, in either case, I guess we shouldn't bet on that?
    0
  • cPRex Jurassic Moderator
    That's some good work there - I don't code, so I can't say for sure, but if you're seeing them sorted by mtime that would make sense. I think the issue is just that we don't guarantee anything specific.
    0
  • cPRex Jurassic Moderator
    I did just want to update this to confirm the findings posted above are correct, and there is not a guaranteed order.
    0

Please sign in to leave a comment.