WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Getting a template to work in 2.8

<< < (2/2)

doc:
Hi,


--- Quote ---Invalid WebsiteBaker installation file. Please check the *.zip format.
--- End quote ---
This message indicates that an Add-on (template or module) does not include a index.php file in the root of the Add-on. An index.php file is required for all add-ons since WB 2.8.

Unzip the Add-on locally, add a dummy file called index.php to the root folder. Than zip the Add-on (without the Add-on folder) and try it again.

Doc

rauni:

Hey I'm REALLY new to WebsiteBaker and I've just installed the new 2.8.1 version on WebsiteBaker and to my surprise it was giving me that same error;


--- Quote ---Invalid WebsiteBaker installation file. Please check the *.zip format.
--- End quote ---

And doc explained how to fix this, yet I have no clue what he is talking about? Root of Add-on? I saw index.php in both my "addon" and "module" folders on my site? Is there some sort of walk through to doing this? As I've never done anything like this.

I HIGHLY appreciate any help on this matter.

BerndJM:
Hi,

the most common error that causes this message is, that the zip-file is unpacked (either from the user or from the os) and after this is wrong packed again.
doc's talkin' about the index.php in the root of the zip.

You must pack only the files in the folder - not the folder with the files!

Example contet of "my_template.zip":


--- Code: ---my_template
 |--- index.php
 |--- info.php
 |--- template.css

--- End code ---

Is wrong!


--- Code: ---index.php
info.php
template.css

--- End code ---

Is correct!

Also see here:
http://www.websitebaker2.org/en/help/designer-guide/creating-a-wb-template.php#anker3

Regards Bernd

rauni:
Wow. Thank you. Especially for the speedy reply.

doc:
Hi,

just for clarification because some things are mixed up in this thread.

Scenario 1: Missing index.php file (only modules)
Templates needs a index.php file in any WB version, as this file provides the HTML markup of the page.
Since WB 2.8 also MODULES require a "index.php" file in it´s module folder as explained in the Developer guide.

Scenario 2: Wrong ZIP file structure (all Add-ons)
The second possible issue with Add-ons (modules and templates) is a invalid ZIP file structure. On Mac OS for example, the Add-on folder is often included by default, which is not allowed and leads to invalid archive structure for WB. The zip file structure is shown here (compare column 6 "Pfad" of the two figures).

Scenario 1+2 lead to the WebsiteBaker error message: "Invalid WebsiteBaker installation file. Please check the *.zip format."

Scenario 3: Permissions
In this case your system has not the right permissions to create files in the /temp, /templates/, or the /modules folder. Per default Add-ons are uploaded as zip file to WB /temp folder. Here they will be extracted and checked (e.g. if info.php and index.php file exists). If correct a folder is created in /templates or /modules and the temporary files are copied over.

In case of insufficient file permissions, the installation process quits with another error message.
One option is to copy the Add-on files via FTP into their respective folders (/templates, /modules). In case of MODULES, one may need to invoke the "upgrade or install script" of the module manually. This steps needs to be excecuted, if the module provides an upgrad or install script, which alters the database entries.
After the manual upload, one should reload the Add-ons to get them listed in the WebsiteBaker overview.

However, preferred way to solve the permission issues is to set the required permissions via the admin panel of your webservice provider (if available) or to contact your provider in order to set the right permissions for you. The FTP option is a "workaround" which should only be used by experienced users knowing all the consequences coming along with mixing PHP and FTP uploads depending on server configurations :wink:

Doc

Navigation

[0] Message Index

[*] Previous page

Go to full version