FAQs

Troubleshooting

I do not see Theme File Editor in the admin sidebar

Only users with the site_admin or global_admin role can see or use the module. Check the user's role under Admin > Users, and check that the module is active under Admin > Modules. To allow other roles, see Configuration.

The file shows "This file is not writable" and Save is disabled

The web server user cannot write to the file. Run the command shown in the banner on the server, for example:

chmod 664 /path/to/omeka/themes/mytheme/view/common/layout.phtml
# or for a whole theme:
chmod -R u+w,g+w /path/to/omeka/themes/mytheme/view/

Also make sure the web server user (for example www-data) owns the file or belongs to its group. The module never changes permissions itself.

Saving fails with "File is too large to edit in the browser"

The file exceeds Maximum editable file size (KB). Raise the limit under Admin > Modules > Configure (up to 10240 KB) or edit that file directly on the server.

Saving is blocked by a syntax error I cannot see

If the banner says exec() is disabled, the module is using its heuristic check, which counts { and } and PHP tags anywhere in the file, including inside strings and comments. Check the file, then tick Save anyway (override syntax check) and save. Ask your host about enabling exec() for full php -l checking, or turn the check off under Admin > Modules > Configure.

The syntax check reports errors for valid files, or never reports anything

With exec() available, the module runs the PHP CLI binary. Under PHP-FPM, PHP_BINARY points at the FPM binary, so the module looks for the CLI next to it (php84-fpm becomes php84), then in PHP_BINDIR, then falls back to php on the PATH. If none of these is a working CLI, php -l fails and the save is blocked with the command's output. Install the PHP CLI package for your PHP version, or disable the syntax check.

"Rate limit exceeded" when saving

You saved more than Maximum saves per user per minute times within the last 60 seconds. The count is stored per user in the user_setting table, so it applies across browser tabs and requests. Wait a minute or raise the limit under Admin > Modules > Configure.

"Access denied: path is outside allowed directory"

The requested path resolved, after following symbolic links, to somewhere outside the theme, module or application view/ directory. This usually means the file or one of its parent directories is a symbolic link pointing elsewhere. Replace the link with a real file or directory.

"File does not exist" when opening a file

The path in the URL does not resolve to a file. This happens after a file is deleted or renamed on the server, or when the theme, source or module parameters do not match the file. Click Refresh and open the file from the tree again.

I clicked Copy to Theme but the file is still read-only

After the copy, the page reloads showing the original module or application file. Switch Browse source: to Theme files and open the copied file from the theme's tree. See Overriding Module and Application Views.

Copy Theme fails

  • A theme named 'x' already exists. Choose a different name or remove the existing directory on the server.
  • Invalid theme name. Use only letters, numbers, _ and -.
  • Failed to create directory. The web server user cannot write to themes/. Make the directory writable, run the copy, then restore the original permissions if you prefer.

The Revision History button is missing

It appears only after the file has at least one revision, that is, after its first save through the module (or after it was created by Copy to Theme or Copy Theme). Files that have only ever been edited outside the module have no history.

My edit does not appear on the public site

Check which theme the site uses on its Theme page (/admin/site/s/<slug>/theme) and make sure you edited that theme. Opening the editor through the site's Theme Files sidebar link selects the correct theme automatically. Also confirm the file you edited is not overridden by another file: the theme's own view/ file wins over module and application views.

The "Create disk backup before overwriting" setting does not seem to apply

That setting only controls whether the Create disk backup checkbox next to the Save button is ticked when the editor page loads. The checkbox state at the moment you save decides whether a .bak copy is written, so untick or tick it for an individual save as needed. Reload the editor page after changing the setting to see the new default. Backups are named <file>.phtml.<timestamp>.bak and are never deleted by the module.

The theme_file_revision table is getting large

Lower Revisions to keep per file under Admin > Modules > Configure. Pruning happens per file when that file is next saved, so files that are never saved again keep their old revisions. You can delete rows from theme_file_revision manually; nothing else references the table.

Can I edit CSS, JavaScript or theme.ini?

No. Only .phtml files inside a theme's view/ directory can be opened or saved. Other files are shown dimmed in the tree, and files outside view/ are not listed at all.

Log in for Support