This plugin is invalid: The required file "start.php" is missing

I am maintaining a website running on Elgg 2.3.7. I have been trying to install a 3rd-party plugin called 'Widget Manager'. When I tried to activate this plugin, I got this error 'This plugin is invalid: The required file "start.php" is missing. Location: /var/www/html/mod/widget_manager/'.   The issue is that there is the start.php in this mod.

So I created an empty start.php file to fix this but it didn't solve the problem neither. The file permission for this plugin is the same as working plugins. Advice or solutions are appreciated. Thanks all!

  • empty your cache in the admin part
    edge heel
    then an update
    
    and for browsing in private browsing not to use the cache

     

  • @jmperu It isn't an elgg cache but maybe OPCache, memcached etc
  • Are you sure that you definitely have the start.php (of Widget Manager plugin) file now at the location <Install folder of your Elgg site>/mod/widget_manager/start.php? Plugin folder name is "widget_manager")? Have you tried adding other 3rd party plugins before? If yes, did it work with the other plugins? Just asking to know if there's something wrong with installing the Widget Manager plugin or if the problem is with any plugin added.

    I have to admit that I currently have no idea what exactly might be wrong if the files (especially start.php) exist and have correct permissions and owner.

  • @jmperu - Thanks I already tried what you suggested but it did not work for me

    @RvR - I also tried to clear my VM system cache by running sync; echo 1 > /proc/sys/vm/drop_caches on my VM https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/. After that, I cannot ssh to my VM at all and my site is not working at all.

    @iionly - I am 100% sure that start.php is in the Widget Manager directory and the folder name is widget_manager. I used several 3rd-party plugins and they are working fine.

    Thanks all for your helps!

  • I've not talked about the system cache but about OPcache, memcached.

  • @RvR - I saw your response to jmperu after I already ran that sync command :)

  •  
    Hello, did you modify a file with a publisher
     
    check your coding without bom

     

  • My colleague found a solution for this issue. It turned out to be SELinux issue in this case. Below are steps on how to check and configure SELinux:

    1) Run ls -lZ in mod directory to check context types of each plugins. widget_manager directory was missing httpd_sys_content_t

    2) Add context type to all mods by running (as root) semanage fcontext -a -t httpd_sys_content_t "/your_path/mod(/.*)?"

    3. Apply new policy changes by running (as root) restorecon -Rv /your_path/mod

    More info about SELinux : https://www.serverlab.ca/tutorials/linux/web-servers-linux/configuring-selinux-policies-for-apache-web-servers/

    Thanks all again for your help!

  • Glad you got it fixed.

    I have to admit that I hadn't thought about SELinux as possible reason for the problem, especially as you said you added other plugins without issues. The one time I had suggested SELinux in a similar case in the past it turned out something else in the end, so SELinux isn't on my short list when coming up with possible reasons for these kind of problems.

    May I ask what you did differently in case of the Widget Manager folder install compared to the other files and folders you had added (first of all Elgg core itself) that resulted in a different context just for the widget_manager folder?

  • @ iionly - I took over this website running Elgg from my colleagues. They were the ones who installed Elgg cores and other 3rd-party plugins as well as configured plugins context. So my guess is that they manually applied SELinux policy to mod/* after installation.