khodakhah / nodcms

NodCMS-Bundle - to download - the open-source PHP CMS based on the CodeIgniter
https://nodcms.com
MIT License
71 stars 64 forks source link

Backend site error - Use of undefined constant SELF_PATH #109

Open skeutmeier opened 1 year ago

skeutmeier commented 1 year ago

Hi,

Im new to NodCMS. I installed it locally, and everything seem to work, but the backend site settings -> hompage

When I try to open that one, ig ot the following error: Use of undefined constant SELF_PATH - assumed 'SELF_PATH' (this will throw an Error in a future version of PHP)

I grepped the code and could not find where SELF_PATH is defined, so I tried to define it myself in .env, but that didnt help either

running on PHP 7.4

on PHP 8.1 nothing works. I get errors on every path (frontend and backend)

Can someone help me please?

Thank you Screenshot from 2022-11-27 00-25-42

DEV-byoos commented 1 year ago

hello dev follow this correctif

IN /root/public/index.php added tis define under FCPATH // Path to the front controller (this file) define('FCPATH', DIR . DIRECTORY_SEPARATOR); // NodCMS public path define("SELF_PATH", FCPATH);

PS, I'm preparing a patch tuto to make NodCms more powerful, watch http://byoosdigital.com the blog

khodakhah commented 1 year ago

Thank you for reporting this. We will handle it in the next version.