Error on Sites Directory Path save - update to config form help text?

Open Beginner friendly
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
documentation

Research direction

The validation lives in StaticSiteExportPlugin.php around line 84, where the sites directory path is passed through realpath(); read that check first to see what it accepts. Then find the plugin's config form definition (the same plugin class or its config form) and locate the existing help text for the sites directory field. Done means that help text states an absolute server path is required and gives an example, so a user does not hit the install exception when entering a relative path.

Written by the indexing model from the issue text.

Description

Thanks for this plugin, which looks like it will be helpful to archive sites that aren't being actively updated!

I installed on an older Omeka 3.0.3 site to see if I could export a static site instead of upgrading PHP, but I can't get past the config step. The db table seems to have been created on install, but I get this error when attempting to save a value with relative paths:

Omeka_Plugin_Installer_Exception: Invalid sites directory path in /var/www/html/mnenvironments/plugins/StaticSiteExport/StaticSiteExportPlugin.php:84
Stack trace:
#0 /var/www/html/mnenvironments/application/libraries/Omeka/Plugin/Broker.php(142): StaticSiteExportPlugin->hookConfig()
#1 /var/www/html/mnenvironments/application/controllers/PluginsController.php(55): Omeka_Plugin_Broker->callHook()
#2 /var/www/html/mnenvironments/application/libraries/Zend/Controller/Action.php(516): PluginsController->configAction()
#3 /var/www/html/mnenvironments/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch()
#4 /var/www/html/mnenvironments/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch()
#5 /var/www/html/mnenvironments/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#6 /var/www/html/mnenvironments/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#7 /var/www/html/mnenvironments/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#8 /var/www/html/mnenvironments/admin/index.php(28): Omeka_Application->run()
#9 {main}

After reading the actual code comments at line 84, I saw it was using realpath() and gave it an absolute path from the server and it worked.

Maybe just some more detail in the help text on the config form about the desired format?

Dominant language
PHP
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from omeka/plugin-StaticSiteExport

All issues in omeka/plugin-StaticSiteExport

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.