PrestaShop

PrestaShop 9.1.4: Decoding the 'Configuration is Not Set' Error in Maintenance Mode

Screenshot of PrestaShop defines.inc.php file with _PS_MODE_DEV_ set to true
Screenshot of PrestaShop defines.inc.php file with _PS_MODE_DEV_ set to true

PrestaShop 9.1.4: Decoding the 'Configuration is Not Set' Error in Maintenance Mode

As e-commerce migration experts at Migrate My Shop, the PrestaShop Migration Hub, we frequently guide merchants through the intricate landscape of platform setup and optimization. While migrating to a new PrestaShop version or launching a fresh store, configuration challenges are a common hurdle. One such perplexing issue recently surfaced in the PrestaShop forums, highlighting a crucial, yet often overlooked, aspect of module setup: the impact of your store's operational status, particularly when in maintenance mode.

The Initial Roadblock: "The configuration is not set"

A user, Billd111, encountered a perplexing error message, "The configuration is not set. You have an issue with your configuration, try onboarding again or contact our support," immediately after installing a fresh PrestaShop 9.1.4 instance. This error appeared when attempting to configure the default PrestaShop checkout module, effectively preventing the store from going live. Despite meticulously checking all available configuration tabs and ensuring basic settings were in place, the source of the problem remained elusive.

This scenario is all too familiar. A clean install should, in theory, be straightforward. Yet, the generic nature of PrestaShop's front-end error messages can send even experienced users down a rabbit hole of troubleshooting. The checkout module, being a critical component of any e-commerce store, needs a robust and complete configuration to function correctly.

Community's First Response: Debugging and Logs – Your First Line of Defense

The PrestaShop community, known for its collaborative spirit, quickly jumped in with standard, yet crucial, troubleshooting advice. Fellow users like ComGrafPL and jasonmiller recommended enabling debug mode and scrutinizing the server logs for more specific error messages. This is always a critical first step in PrestaShop debugging, as the front-end error messages are often generic and lack the detail needed for effective problem-solving.

Common causes for such configuration issues were suggested:

  • Missing or Inactive Currency/Country Settings: PrestaShop requires at least one active currency and country for transactions.
  • SSL or Shop URL Not Properly Set: Incorrect shop URLs or a missing SSL certificate can break module communication, especially for payment gateways.
  • Incomplete Payment or Shipping Setup: Even if the module is installed, its internal settings for payment methods or shipping zones might be incomplete.
  • Cached Configuration Stuck After Onboarding: PrestaShop's caching mechanisms can sometimes hold onto old or incomplete configuration data.

The advice included clearing the cache and even re-running the onboarding process. However, Billd111, being new to PrestaShop 9.1.4, struggled to locate the 'dev mode' or find any error logs beyond the 'Advanced Parameters' section, which, frustratingly, showed all green.

How to Enable Debug Mode in PrestaShop 9.1.4:

For those new to PrestaShop or struggling to find the 'dev mode' toggle, the most reliable method is to directly edit your configuration file:

  1. Access your PrestaShop installation via FTP or your hosting's file manager.
  2. Navigate to the config directory.
  3. Open the defines.inc.php file.
  4. Locate the line: define('_PS_MODE_DEV_', false);
  5. Change false to true: define('_PS_MODE_DEV_', true);
  6. Save the file.

Once debug mode is enabled, refresh your PrestaShop back office. You should now see more detailed error messages, including stack traces, which are invaluable for pinpointing the exact issue. Remember to disable debug mode once troubleshooting is complete, as it can expose sensitive information and impact performance.

Additionally, always check your server's PHP error logs (often found in var/logs within your PrestaShop root or via your hosting control panel) for deeper insights into server-side issues.

Screenshot of PrestaShop defines.inc.php file with _PS_MODE_DEV_ set to true

The Unexpected Solution: Maintenance Mode vs. Online Status

The breakthrough came when Billd111 discovered the root cause: the store was in maintenance mode. As soon as the store was taken online and then re-linked to the PayPal account, the "Configuration is not set" error vanished.

This highlights a critical, yet often overlooked, aspect of PrestaShop module configuration, especially for payment gateways and external service integrations. Many payment modules, like the default PrestaShop checkout module integrating with services like PayPal, require your store to be publicly accessible (online) to complete their initial setup and validation. This is because:

  • API Handshakes: Payment gateways often perform API calls to your store's URLs (e.g., for callback URLs, IPN notifications) during configuration to verify the connection.
  • Security Checks: They need to ensure your store is a legitimate, accessible endpoint for transactions.
  • Domain Validation: Some services validate the domain against their records, which requires the domain to be live.

When your store is in maintenance mode, it presents a restricted view, preventing these external services from fully communicating with your PrestaShop instance. The solution is simple: temporarily take your store out of maintenance mode, complete the module configuration, and then re-enable maintenance mode if further development is needed.

Beyond the Fix: The Module Upgrade Conundrum

After resolving the initial configuration error, Billd111 faced a new challenge: "Could not perform action upgrade for module undefined." This error, while different, often points to related underlying issues, typically involving file permissions, server resources, or cache corruption.

Troubleshooting "Could not perform action upgrade for module undefined":

  1. Clear Cache: Always start by clearing both PrestaShop's cache (Advanced Parameters > Performance) and your browser's cache.
  2. Check File Permissions: Incorrect file and folder permissions are a common culprit. Ensure folders are 755 and files are 644. Pay special attention to the modules directory and the specific module's folder.
  3. Review Server Error Logs: Beyond PrestaShop's logs, check your web server's error logs (Apache, Nginx) and PHP error logs. These can reveal issues like memory limits being exceeded or other server-side problems preventing the upgrade.
  4. Increase PHP Memory Limit: Module upgrades can be resource-intensive. If your PHP memory limit is too low (e.g., 64MB or 128MB), increase it to at least 256M or 512M in your php.ini file.
  5. Manual Module Upgrade: If all else fails, consider manually upgrading the module. Download the latest version from the PrestaShop Addons marketplace, uninstall the old module (if possible without data loss), and then install the new one. Alternatively, replace the module files via FTP, then clear cache.
  6. Database Consistency: Rarely, database inconsistencies can cause issues. While more advanced, checking your database for corrupted tables might be necessary in persistent cases.
PrestaShop store in maintenance mode being switched to online status to resolve configuration error

Best Practices for PrestaShop Configuration and Migration

Based on this scenario and our extensive experience at Migrate My Shop, here are key takeaways for a smoother PrestaShop experience, especially with PrestaShop 9.1.4:

  • Always Enable Debug Mode During Setup: It's your best friend for detailed error messages.
  • Understand Maintenance Mode's Implications: While essential for development, be aware that it can interfere with external service integrations. Temporarily disable it for critical module configurations.
  • Prioritize Core Settings: Before configuring complex modules, ensure your basic shop settings (currency, country, SSL, shop URL) are perfectly set.
  • Clear Cache Frequently: After any significant configuration change, clear your PrestaShop cache.
  • Regularly Check All Logs: Don't just rely on PrestaShop's back office logs. Dive into server-side logs for a complete picture.
  • Backup Before Major Changes: Always create a full backup of your files and database before attempting module upgrades or significant configuration changes.

The journey of setting up a PrestaShop store, especially with new versions like 9.1.4, can present unique challenges. However, by understanding common pitfalls and employing systematic troubleshooting, you can navigate these issues effectively. At Migrate My Shop, we specialize in ensuring your PrestaShop store, whether new or migrated, runs flawlessly. Don't let configuration errors halt your e-commerce ambitions – reach out to our experts for seamless solutions.

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools