0

I've developed several custom modules in my development environment. My current development environment is Drupal 8 in XAMPP running under Windows and I write the code in Netbeans. I'm getting close to production and I wanted to setup a development environment that mirrors production, so I setup Drupal in CentOS running in VirtualBox.

The problem is, is when I copied over my custom modules Drupal won't recognize them. They don't show up at all under Extend in the list of modules to install. I'm able to open and view the files in VIM and they don't look corrupted in any way. Also, If I create a module natively in CentOS it is recognized just fine. I'm reasonably confident permissions aren't the issue, I've tried setting everything to 777. I'm not 100% sure being written in Windows is the root cause however all the evidence points that way.

Is this a common problem? If so, what can I do to make Drupal recognize these files?

Thanks!

2
  • Both OSs use different line break types (CRLF vs. LF). Long time since I've copied windows files to linux, but back then ftp clients had the option to convert the file format.
    – 4uk4
    Commented Jun 28, 2019 at 18:43
  • Check this article cyberciti.biz/faq/… on how to convert them Commented Jun 29, 2019 at 13:13

1 Answer 1

0

I believe I've figured it out. This issue may not be consider specific to Drupal but Drupal does seem to be a little more particular about files copied over from a Windows dev site.

To get the files to work I had to do two things and in this order:

  1. Recursively convert all files in "/path" from Windows format to Linux format.

    find /path -type f -print0 | xargs -0 dos2unix

  2. Even after doing step #1 Drupal didn't like the files. I ran this to build a new directories.

    rsync -r /input-path /output-path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.