CMS

Issues related to previewing and publishing your web site.
Post Reply
User avatar
Dragos
 
 
Posts: 214
Joined: Tue Sep 04, 2018 7:08 am

CMS

Post by Dragos »

I try to create CMS_PAGES - table in mysql database with:
CREATE TABLE `CMS_PAGES` (

`id` int(10) unsigned NOT NULL auto_increment,
`category_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`content` text NOT NULL,
`home` tinyint(1) NOT NULL default '0',
`visible` tinyint(1) NOT NULL,
`create_date` timestamp NOT NULL,
`created_by` varchar(255) NOT NULL,
`last_update_date` timestamp NOT NULL default '0000-00-00 00:00:00',
`last_update_by` varchar(255) NOT NULL,
`views` int(11) NOT NULL,
`menu_index` smallint(4) NOT NULL,
`url` varchar(255) NULL,
`extra_data` varchar(255) NULL,
`title` VARCHAR(100),
`description` VARCHAR(255),
`keywords` VARCHAR(255),
`seo_friendly_url` VARCHAR(100),
`parent_id` int(11) DEFAULT NULL,
`search_index` int(1) DEFAULT '1'
PRIMARY KEY (`id`));

specified in HELP page....
and i have 2 errors when create the table:

Error
Static analysis:

2 errors were found during analysis.

A comma or a closing bracket was expected. (near "(" at position 784)
Unexpected beginning of statement. (near "`id`" at position 785)
SQL query:

CREATE TABLE `CMS_PAGES` ( `id` int(10) unsigned NOT NULL auto_increment, `category_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `content` text NOT NULL, `home` tinyint(1) NOT NULL default '0', `visible` tinyint(1) NOT NULL, `create_date` timestamp NOT NULL, `created_by` varchar(255) NOT NULL, `last_update_date` timestamp NOT NULL default '0000-00-00 00:00:00', `last_update_by` varchar(255) NOT NULL, `views` int(11) NOT NULL, `menu_index` smallint(4) NOT NULL, `url` varchar(255) NULL, `extra_data` varchar(255) NULL, `title` VARCHAR(100), `description` VARCHAR(255), `keywords` VARCHAR(255), `seo_friendly_url` VARCHAR(100), `parent_id` int(11) DEFAULT NULL, `search_index` int(1) DEFAULT '1' PRIMARY KEY (`id`))

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`id`))' at line 43

I have MySql 5.7.28 version. Line 43 is PRIMARY KEY line
This is the error before try to make table just after write text:
https://drive.google.com/file/d/1qy3wda ... sp=sharing
User avatar
Pablo
 
Posts: 21577
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CMS

Post by Pablo »

I do not see any errors in the syntax.
Also, I have not heard about this error before.
Are you sure you have entered the correct statement?
MGD4me
 
 
Posts: 287
Joined: Tue May 02, 2017 11:56 pm
Location: British Columbia, Canada

Re: CMS

Post by MGD4me »

Try this ...

Change: `last_update_date` timestamp NOT NULL default '0000-00-00 00:00:00',

To: `last_update_date` timestamp NULL,

and second, near the end of your SQL code, add a comma at the end of the statement where it says: `search_index` int(1) DEFAULT '1'

It should be: `search_index` int(1) DEFAULT '1',
User avatar
Dragos
 
 
Posts: 214
Joined: Tue Sep 04, 2018 7:08 am

Re: CMS

Post by Dragos »

YES...work great
thx
User avatar
Dragos
 
 
Posts: 214
Joined: Tue Sep 04, 2018 7:08 am

Re: CMS

Post by Dragos »

I have another problem with cmsadmin .... I created a page (cmsadmin.php) and it is not possible to see the content .... the same page appears on the page as if I had entered inlineframe with the same link ... as can be seen in the picture ...
https://drive.google.com/file/d/1WWNcj5 ... sp=sharing
This is the project:
https://drive.google.com/file/d/1FaszVw ... sp=sharing
User avatar
Pablo
 
Posts: 21577
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CMS

Post by Pablo »

Maybe you have accidentally set the URL in the page properties of the online CMS admin?
User avatar
Dragos
 
 
Posts: 214
Joined: Tue Sep 04, 2018 7:08 am

Re: CMS

Post by Dragos »

Except SEO (Canonical and hreflang) and Miscellaneous (redirect) which are white, in page properties i can't find any settings for URL....NO i dont set..
User avatar
Pablo
 
Posts: 21577
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CMS

Post by Pablo »

Are you sure the 'External URL' field of the page (on the servre) is empty?

Note that if is very difficult to help you without knowing all the settings.
The CMS has many settings, so to be able to help you I also need to know the server configuration.
User avatar
Dragos
 
 
Posts: 214
Joined: Tue Sep 04, 2018 7:08 am

Re: CMS

Post by Dragos »

I do not understand what you want to say if the field on the server is free .... I emptied the entire public folder and republished the website ... you can see online here: https://workpage.ro.
Exactly what server settings do you need?
cmsadmin.php on the server look like ..:


<!doctype html>
<html lang="ro">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="utf-8">
<title>admin</title>
<meta name="generator" content="administrator">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="loginblog.css" rel="stylesheet">
<link href="cmsadmin.css" rel="stylesheet">
<script src="jquery-1.12.4.min.js"></script>
<script>
$(document).ready(function()
{
$('.Extension1 .item-has-children').children('a').on('click', function(event)
{
event.preventDefault();
$(this).toggleClass('submenu-open').next('.sub-menu').slideToggle(200,'linear').end().parent('.item-has-children').siblings('.item-has-children').children('a').removeClass('submenu-open').next('.sub-menu').slideUp(200,'linear');
});
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {$('#preloader').remove();}
});
$(window).on('load', function()
{
$('#preloader').remove();
});
</script>
</head>
<body>
<div id="container">
</div>
<div id="wb_LayoutGrid1">
<div id="LayoutGrid1">
<div class="row">
<div class="col-1">
<div id="wb_Image1">
<img src="images/bleu.png" id="Image1" alt="">
</div>
</div>
<div class="col-2">
<div id="wb_Extension1">
<div id="Extension1" class="Extension1">
<ul class="multilevel-menu">
<li><a href="./index.html">HOME</a></li>
<li><a href="./Blog.php">Blog</a></li>
<li><a href="./cmsadmin.php">admin</a></li>
</ul>
</div>

</div>
</div>
</div>
</div>
</div>
<div id="wb_LayoutGrid2">
<div id="LayoutGrid2">
<div class="row">
<div class="col-1">
<iframe id="CmsAdmin1" name="cmsadmin" src="cmsadmin.php"></iframe>
</div>
</div>
</div>
</div>
<div id="wb_LayoutGrid3">
<div id="LayoutGrid3">
<div class="row">
<div class="col-1">
<div id="wb_Image2">
<img src="images/alb.png" id="Image2" alt="">
</div>
</div>
</div>
</div>
</div>
<div id="preloader"></div>
</body>
</html>
User avatar
Pablo
 
Posts: 21577
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CMS

Post by Pablo »

The name of the cms admin page should not be 'cmsadmin',. This conflicts with the 'frame name' of the cms admin.
User avatar
Dragos
 
 
Posts: 214
Joined: Tue Sep 04, 2018 7:08 am

Re: CMS

Post by Dragos »

In cms_admin plugin properties i find Frame setting wich standard are with cmsadmin. If i delete cmsadmin from frame settings (cms_admin properties)
open just in php(script) not like html webpage...
User avatar
Dragos
 
 
Posts: 214
Joined: Tue Sep 04, 2018 7:08 am

Re: CMS

Post by Dragos »

I change the name of the page...now work....to much news in 16 version... :) :) :) Thank you very much..
Post Reply