Jump to content

No CSS files Created via Plugin-in upload


TDBF
 Share

Go to solution Solved by bfarber,

Recommended Posts

When in Developer mode, if I upload a plug-in, the developer (Dev directory) files are created (Manual upload), however the css files are created in the css folder. However, the CSS styles can be found in the theme ACP.

Also, I have found that sometimes the version files in setup don't always get created either on install..

 

Link to comment
Share on other sites

  • 3 months later...

@bfarber getting the same issue - please see below

The following conditional fails in `system/Theme/Theme.php` - line 4882

// create the plugin template
if( \IPS\IN_DEV AND $data['app'] === 'core' AND $data['location'] === 'custom' AND $data['path'] === 'front' AND isset( $data['plugin'] ) )
{
	$plugin = \IPS\Plugin::load( $data['plugin'] );

	\file_put_contents( \IPS\ROOT_PATH . "/plugins/{$plugin->location}/dev/css/{$data['name']}", $data['content'] );
	@chmod( \IPS\ROOT_PATH . "/plugins/{$plugin->location}/dev/css/{$data['name']}", \IPS\IPS_FILE_PERMISSION );
}

 

Why? When you do manual upload the variables are set incorrectly.

`applications/core/modules/admin/applications/plugins.php` - line 681

$class::addCss( array(
  'app'			=> 'core',
  'location'	=> 'front',
  'path'		=> 'custom',
  'name'		=> $xml->getAttribute('filename'),
  'content'		=> base64_decode( $xml->readString() ),
  'plugin'		=> $plugin->id
), TRUE );

 

Please look at `location` and `path`.

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...