Home Forums Backend Issues (wp-admin) Problem with Local Dev, Symbolic Links, & Asset Paths Reply To: Problem with Local Dev, Symbolic Links, & Asset Paths

  • I am using the free version of this plugin. It is installed globally, *not* via another plugin or theme. As such, it exists at /wp-content/plugins/advanced-custom-fields/.

    However, in my deloyment, /wp-content/plugins is actually a symlink to “../../wordpress/plugins”, which resolves to /srv/php/$job_name/wordpress/plugins/. Uploads and themes are done the same way. It was done like this, because the entirety of wordpress is built with a docker image, and is mounted RO, to prevent file overwrite intrusion attempts.

    I am also seeing js/css urls like http://$host_name/srv/php/$job_name/wordpress/plugins/advanced-custom-fields/….

    This is due to using __FILE__ in the __construct() function, and then attempting to send that in the enque_script/enqueue_style callouts. Adding a filter in my job_plugin, or job_theme, won’t help, as the advanced-custom-fields plugin is initialized *first*, so the acf/helpers/get_dir filter has already run.