Skip to main content
Topic: Have error when preview or publish my project (Read 3779 times) previous topic - next topic

Have error when preview or publish my project

i using PHP RAD Classic 2.7.2
i created new project.
and click preview button for render project.
please help me.

Quote
Error 500
Server Error

Exception Traces
This will only be displayed in DEVELOPMENT_MODE.
Error Message   syntax error, unexpected '$page_title' (T_VARIABLE)
File   D:\xampp\htdocs\school\app\views\layouts\main_layout.php On Line 8
Stack Trace   1 D:\xampp\htdocs\school\system\BaseController.php(394): BaseView->render('home/index.php', NULL, 'main_layout.php')
2 D:\xampp\htdocs\school\app\controllers\IndexController.php(16): BaseController->render_view('home/index.php', NULL, 'main_layout.php')
3 D:\xampp\htdocs\school\system\Router.php(196): IndexController->index()
4 D:\xampp\htdocs\school\system\Router.php(109): Router->run('')
5 D:\xampp\htdocs\school\index.php(106): Router->init()


Re: Have error when preview or publish my project

Reply #2
i create new project using English language. It's work.
but i create new project using custom language. It's error.
i added custom lang in "Locale.xml" then have error on publish.

Re: Have error when preview or publish my project

Reply #3
@yaknoi‍ please provide a screenshot of this file D:\xampp\htdocs\school\app\views\layouts\main_layout.php On Line 8

<?php
   // Set url Variable From Router Class
   $page_name = Router::$page_name;
   $page_action = Router::$page_action;
   $page_id = Router::$page_id;
   $body_class = "$page_name-" . str_ireplace('list','index', $page_action);
   __setbodyid
   $page_title = $this->get_page_title();
?>
<!DOCTYPE html>
<html__directionforarabic>
   <head>
      <title><?php echo $page_title; ?></title>
      <meta http-equiv="content-type" content="text/html;charset=utf-8" />
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
      <link rel="shortcut icon" href="<?php print_link(SITE_FAVICON); ?>" />
      <?php
         Html ::  page_meta('theme-color',META_THEME_COLOR);
         Html ::  page_meta('author',META_AUTHOR);
         Html ::  page_meta('keyword',META_KEYWORDS);
         Html ::  page_meta('description',META_DESCRIPTION);
         Html ::  page_meta('viewport',META_VIEWPORT);
         Html ::  page_css('__pagefontcss.css');
         Html ::  page_css('animate.css');
         Html ::  page_css('blueimp-gallery.css');
      ?>
      __themecssinclude
      <?php
         __dateplugincss
         __htmleditorplugincss
         __editableplugincss
         __fileuploadplugincss
         __selectizeplugincss
         __rangesliderplugincss
         __smartwizardplugincss
         __datatableplugincss
         Html ::  page_js('jquery-3.3.1.min.js');
         __chartsplugin
      ?>
   </head>
   __pagebodyid
      <div id="page-wrapper">
         <!-- Show progress bar when ajax upload-->
         <div class="progress ajax-progress-bar">
            <div class="progress-bar"></div>
         </div>
         <?php
            $this->render_view('appheader.php');
         ?>
         
         <div id="main-content">
            <!-- Page Main Content Start -->
               <div id="page-content">
                  <?php $this->render_body();?>
               </div>   
            <!-- Page Main Content [End] -->
            
            __includepagefooter
            
            <div class="flash-msg-container"><?php show_flash_msg(); ?></div>
            
            <!-- Modal page for displaying ajax page -->
            <div id="main-page-modal" class="modal fade" role="dialog">
               <div class="modal-dialog modal-lg">
                  <div class="modal-content">
                     <div class="modal-body p-0 reset-grids inline-page">
                        
                     </div>
                     <div style="top: 5px; right:5px; z-index: 999;" class="position-absolute">
                        <button type="button" class="btn btn-sm btn-danger" data-dismiss="modal">&times;</button>
                     </div>
                  </div>
               </div>
            </div>
            
            <!-- Modal page for displaying record delete prompt -->
            <div class="modal fade" id="delete-record-modal-confirm" tabindex="-1" role="dialog" aria-labelledby="delete-record-modal-confirm" aria-hidden="true">
               <div class="modal-dialog" role="document">
                  <div class="modal-content">
                     <div class="modal-header">
                        <h5 class="modal-title">[html-lang-0138]</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                           <span aria-hidden="true">&times;</span>
                        </button>
                     </div>
                     <div id="delete-record-modal-msg" class="modal-body"></div>
                     
                     <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">[html-lang-0139]</button>
                        <a href="" id="delete-record-modal-btn" class="btn btn-primary">[html-lang-0066]</a>
                     </div>
                     
                  </div>
               </div>
            </div>

            <!-- Image Preview Component [Start] -->
            <div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">
               <div class="slides"></div>
               <h3 class="title"></h3>
               <a class="prev">‹</a>
               <a class="next">›</a>
               <a class="close">×</a>
               <a class="play-pause"></a>
               <ol class="indicator"></ol>
            </div>
            <!-- Image Preview Component [End] -->

            <template id="page-loading-indicator">
               <div class="p-2 text-center m-2 text-muted m-auto">
                  <div class="ajax-loader"></div>
                  <h4 class="p-3 mt-2 font-weight-light">[html-lang-0067]</h4>
               </div>
            </template>
            <template id="page-saving-indicator">
               <div class="p-2 text-center m-2 text-muted">
                  <div class="lds-dual-ring"></div>
                  <h4 class="p-3 mt-2 font-weight-light">[html-lang-0140]</h4>
               </div>
            </template>
            
            <template id="inline-loading-indicator">
               <div class="p-2 text-center d-flex justify-content-center">
                  <span class="loader mr-3"></span>
                  <span class="font-weight-bold">[html-lang-0067]</span>
               </div>
            </template>
         </div>
      </div>
      <script>
         var siteAddr = '<?php echo SITE_ADDR; ?>';
         var defaultPageLimit = <?php echo MAX_RECORD_COUNT; ?>;
         var csrfToken = '<?php echo Csrf :: $token; ?>';
      </script>
      <?php
         Html ::  page_js('popper.js');
         Html ::  page_js('bootstrap-4.3.1.min.js');
      ?>
      __themejsinclude
      <?php
         __datepluginjs
         __datepluginlocalejs
         __inputmaskpluginjs
         __htmleditorpluginjs
         __selectizepluginjs
         __momentpluginjs
         __editablepluginjs
         __fileuploadpluginjs
         __fileuploadplugininit
         __rangesliderpluginjs
         __smartwizardpluginjs
         Html ::  page_js('plugins.js'); //boostrapswitch, passwordStrength, twbs-pagination, blueimp-gallery,
         Html ::  page_js('plugins-init.js');
         Html ::  page_js('page-scripts.js');
      ?>
   </body>
</html>

Re: Have error when preview or publish my project

Reply #4
@yaknoi‍ please create your project in English, after generating your project go to your projects /languages folder and duplicate the english.ini file and rename the duplicate to you {YOUR LANGUAGE}.ini, then open your language file in a text editor and translate the text in a double quotation on the right side of the = sign to your language.