upskill-event-manager/wordpress-dev/wordpress/wp-config.php
bengizmo 37f7b426b6 feat: Implement auto page creation & fix login E2E tests
Implements automatic creation of required plugin pages (Community Login,
Trainer Registration, Trainer Dashboard) upon plugin activation. This
addresses E2E test failures caused by missing pages in the test
environment.

- Adds activation hook in `hvac-community-events.php` to call
  `hvac_ce_create_required_pages`.
- The callback function checks for existing pages by slug and creates
  them using `wp_insert_post` if missing. Includes debug logging.

Also fixes issues identified during E2E test debugging:
- Corrects fatal error in `includes/community/class-login-handler.php`
  by replacing undefined constant `HVAC_COMMUNITY_EVENTS_PATH` with
  `HVAC_CE_PLUGIN_DIR`.
- Updates `tests/e2e/tests/login.spec.ts` to use the correct selector
  `#wp-submit` for the login form submit button instead of
  `button[type="submit"]`.

Documentation updates:
- Adds `docs/automatic-page-creation-plan.md`.
- Updates `README.md` regarding automatic page creation.
- Updates Memory Bank files (`decisionLog.md`, `progress.md`,
  `activeContext.md`).

Note: Activation hook logging did not appear during WP-CLI activation,
requiring further investigation if page creation issues persist. E2E
test confirmation pending.
2025-03-28 17:18:21 -03:00

61 lines
1.9 KiB
PHP

<?php
/**
* The base configuration for WordPress
*/
// ** Database settings - Skipped if WP_TESTS_RUNNING is defined ** //
if ( ! defined( 'WP_TESTS_RUNNING' ) ) {
define('DB_NAME', 'ncjzsayvsk');
define('DB_USER', 'ncjzsayvsk');
define('DB_PASSWORD', 'sU5knzeUgb');
define('DB_HOST', 'db');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
}
/**#@+
* Authentication Unique Keys and Salts.
*/
define('AUTH_KEY', 'mDN=c{&a=>j1]e+Z$.80AT++:6?Xhrodxd[_S;54<L8a_ban$|SO6h');
define('SECURE_AUTH_KEY', '?2QF|-!eUjx2cs{,yWmqGM%4.SfRi@v-dm-e0/Pej}q0GBukP<u+x[w0Wo-lPm[d');
define('LOGGED_IN_KEY', 'HOt?vigXMHbW=-F1875Q2Zsi&P!rssD#zILN)C5|;YKl?(36>*mdD<{xG');
define('NONCE_KEY', ' %WDT]#vSTmbCs.OKE+83/iC>-jnHl73uzayMt+eDOv/{Pr-Rp,j-WZ.L5w!5');
define('AUTH_SALT', '5v0-0Memr/s.r,T(6(,Y^VE4Qb2bP-vlXrb+sq5+acjj]RqxQaGhT-d3E7%bI}');
define('SECURE_AUTH_SALT', 'YX]7zD&X*[,U&G 2ce.5}ST4tdvl)1:Mmk9_)P!Ei>.xO3&(9YfQ:@.-Fxz7ey');
define('LOGGED_IN_SALT', '1X*6CKC;PeJA>Ho9$|*VCv-1q9eA2o&@#Q+Sk7?^m=z|s4l+<@zLQx_;k+U5[Ns*');
define('NONCE_SALT', '%,Vo(QDn:}Ehc!]MMA%D?{=sN>_ 6[ytAL#<wI->Y:7hZm4[hSXgW^6*n}~lZw&');
/**#@-*/
/**
* WordPress Database Table prefix.
*/
$table_prefix = 'wp_';
/**
* For developers: WordPress debugging mode.
*/
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
@ini_set('display_errors', 1);
/* Disable SSL/HTTPS in admin */
define('FORCE_SSL_ADMIN', false);
define('FORCE_SSL_LOGIN', false);
/* Override site URL */
define('WP_HOME', 'http://localhost:8080');
define('WP_SITEURL', 'http://localhost:8080');
/* Add any custom values between this line and the "stop editing" line. */
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if (!defined('ABSPATH')) {
define('ABSPATH', __DIR__ . '/');
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';