MiniCMS plugin for cpg1.5.x - Page 4 MiniCMS plugin for cpg1.5.x - Page 4
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

MiniCMS plugin for cpg1.5.x

Started by Αndré, November 30, 2010, 05:49:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gmc

Reviewing the code - and examining the source of pages for editing both on the displayed pages, and via MiniCMS admin - conid and type are both passed and populated in all cases I can find.

From MiniCMS Admin and editing on displayed page - as well as inserting new content - all post directly to cms_edit.php with conid passed in form data:

<form name="post" method="post" action="index.php?file=minicms/cms_edit&amp;referer=index.php%3Ffile%3Dminicms%2Fcms_admin">
...
<td class="row2">
    <input type="text" value="0" class="post" tabindex="3" style="width: 50px;" maxlength="5" name="conid" />
</td>


and in cms_edit.php issuing the updates:

if(isset($request['submit']) && $request['submit']==$lang_minicms['submit'] && $request['id'] > -1){
    $MINICMS['conid']=(int)$request['conid'];
    $MINICMS['type']=(int)$request['type'];


Insert code for new items is handled just below the updates - driven when $request['id']=='-1' - and properly inserts the conid value passed in the form.

I believe this is a safe change to commit.
An excellent question to verify... :)
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Αndré

Suggested fix committed in SVN revision 8633. Version 2.3 attached to initial post. Thanks for your report.

netb

Hello, I have some weird problem when tried to work with MiniCMS.
I can't type anything in the text field when I create a new Content Title, also many of the editor buttons aren't working or when they open a popup and you close it, the whole area of the editor stays with different color as out of focus.

I have a test gallery setup here http://www.greatmusclebodies.com/gallery/ and test account is admin psw qwerty123

gmc

Please don't post admin credentials... even for a test gallery..  We'll send you a message wit contact info if admin credentials are needed.
I logged in and changed the password - looking at your issue.
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

gmc

Using your test gallery, I have edited existing, and created new items - including using editor buttons driving popups (find).
Can you try from a different computer or browser?  You might have an issue with a browser plugin?

Sending PM with changed admin password.
Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

netb

Quote from: gmc on August 14, 2014, 03:35:19 PM
Using your test gallery, I have edited existing, and created new items - including using editor buttons driving popups (find).
Can you try from a different computer or browser?  You might have an issue with a browser plugin?

Sending PM with changed admin password.
Greg

Hey, thanks! I tried with Opera and Chrome and it wasn't working. On IE I was able to type text but there weren't any of the edit buttons. Seems to work okay in Firefox though. Is this your browser? Now I'll have a different browser for every site, lol. ;D

gmc

I was using Firefox...
I can recreate your problem using Chrome...

MiniCMS is packaged with a version of fckeditor that provides the wysiwyg editor. Guessing this is where the issue is...
There is a replacement - ckeditor ckeditor.com.
Perhaps this can be a simple drop in replacement?

I'll see if I can test this - I have already downloaded/used the new ckeditor elsewhere.
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

flamendeShana

hello,
i have tryed this plugin on an older version, on this all was fine.

so i tryed to re test and install hole copermine,
so i have creata a new database, and installed copermine, all fine, all function workes, after create a dsign based on curve, i wanted to install the MiniCMS.
so i have download this version from start post (v2.3)
i have put all data in plugin folder,
i tryed to install it, press the GO! button.
and then i click at my main page.
there comes the following message:
QuoteKritischer Fehler
Beim Ausführen einer Datenbank-Abfrage ist ein Fehler aufgetreten 
i'm sorry that the error message it's in german.
the tranalstion into english means
QuoteCritical error
on running one data base request a mistake occurred

i can't post a url, to my copermien instalaltion because it's run on a virtual machine at my home. on a Ubuntu-server with apache 2.4.7
and
php version 5.5.9

Server-Typ: MySQL
Server Version: 5.5.38-0ubuntu0.14.04.1 - (Ubuntu)
Protokoll-Version: 10

if you need more infomrations please ask

gmc

Please enable debug mode so we can see a better error message.
http://documentation.coppermine-gallery.net/en/errors.htm#errors_debug_mode_manual
Instructions above for the case where you cannot access the config menu - since you are getting an error accessing the main page.

Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

flamendeShana

i have now enable the debug mode
this happens:

While executing query 'SELECT * FROM cpg15x_cms WHERE conid='0' AND type='0' ORDER BY cpos' in plugins/minicms/codebase.php on line 92

mySQL error: Table 'test.cpg15x_cms' doesn't exist

File: /var/www/html/foto/include/functions.inc.php - Zeile: 272



gmc

OK... looks like the install didn't create the 'cms' table.
I will guess that the id used for Coppermine to access the database doesn't have the authority to CREATE a table?

Easiest way to get out of this: in a tool like phpMyAdmin - edit the 'plugins' table and delete the row that contains 'minicms'...
That will let you back into the gallery.
Correct the error that caused the CREATE TABLE to fail - and reinstall the plugin.
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Αndré

During the Coppermine installation the MySQL already needed CREATE permissions. So I guess it still has, unless you revoked it.

But I agree with Greg, that re-installing the plugin might solve the issue.

flamendeShana

i ahve reinstalled the plugin
i stil get
While executing query 'SELECT * FROM cpg15x_cms WHERE conid='0' AND type='0' ORDER BY cpos' in plugins/minicms/codebase.php on line 92

mySQL error: Table 'test.cpg15x_cms' doesn't exist


(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww11.pic-upload.de%2Fthumb%2F14.10.14%2Fthk136mihyye.jpg&hash=90f10a06ff97c46d2ea1578328749b90d1a155e8)

flamendeShana

uh i cant edit my post, ok, i hope double post is ok in this case...

the rror message says
mySQL error: Table 'test.cpg15x_cms' doesn't exist

i cant find this table... on phpmyadmin
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww11.pic-upload.de%2Fthumb%2F14.10.14%2Fjenlhvdy6ab.jpg&hash=4943abcf9f9a24725ec0805a2e44b7f302aef503)


Αndré

Then you either need to fix the MySQL user's permissions (it needs CREATE, ALTER, INSERT, UPDATE permission) or run the queries in plugins/minicms/sql/basic.sql manually in e.g. phpMyAdmin. Don't forget to replace "CPG_" with your actual database prefix "cpg15x_".

flamendeShana

i have change the user now from coppermine to root,
nothg has changed.
but the databse user "copermine" had all privileges too, (look at first shrenshot)

i'm not realy good in sql, how it works to create it manually?

flamendeShana

ok... i found where to create it manualy...
i get a error
SQL-Befehl:

# Table structure for table `cpg15x__cms`
#
CREATE TABLE  `cpg15x_cms` (

`ID` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`catid` INT( 11 ) NOT NULL DEFAULT  '0',
`title` VARCHAR( 255 ) NOT NULL DEFAULT  '',
`content` TEXT NOT NULL DEFAULT  '',
PRIMARY KEY (  `ID` ,  `catid` ) ,
FULLTEXT KEY  `title` (  `title` ,  `content` )
) AUTO_INCREMENT =1;

MySQL meldet: Dokumentation

#1214 - The used table type doesn't support FULLTEXT indexes

ron4mac

Default table creation for your MySQL must not be MyISAM.
Add ENGINE=MyISAM to the end of the CREATE TABLE statement.

gmc

What version of MySQL are you using?
(go to the information tab - phpinfo as admin in Coppermine if you don't know...)

Appears your installation may be trying to create the table as InnoDB... rather than MyISAM..
http://stackoverflow.com/questions/20964269/1214-the-used-table-type-doesnt-support-fulltext-indexes
Before MySQL 5.6 Full-Text Search is supported only with MyISAM Engine.

Not sure where the default type is specified... You can add ENGINE=MyISAM to the CREATE (see examples at the link provided).

For Devs - Should the engine be specified in plugins creating tables? or what assumptions are made about the users setup?
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

flamendeShana

Quote

Server: Localhost via UNIX socket
Server-Typ: MySQL
Server Version: 5.5.38-0ubuntu0.14.04.1 - (Ubuntu)
Protokoll-Version: 10
Benutzer: root@localhost
Server Zeichensatz: UTF-8 Unicode (utf8)

output of phpinfo:
mysql
MySQL Support   enabled
Active Persistent Links   0
Active Links   1
Client API version   5.5.38
MYSQL_MODULE_TYPE   external
MYSQL_SOCKET   /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE   -I/usr/include/mysql
MYSQL_LIBS   -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r


QuoteNot sure where the default type is specified... You can add ENGINE=MyISAM to the CREATE (see examples at the link provided).
can you please say me where to ad this exactyl?

# Table structure for table `cpg15x__cms`
#

CREATE TABLE `cpg15x_cms` (
  `ID` int(11) NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(255) NOT NULL default '',
  `content` text NOT NULL default '',
  PRIMARY KEY  (`ID`, `catid`),
  FULLTEXT KEY `title` (`title`,`content`)
) AUTO_INCREMENT=1 ;

#
# Table structure for table `cpg15x_cms_config`
#
cpg15x_cms_config (
  name varchar(40) NOT NULL default '',
  value varchar(255) NOT NULL default '',
  PRIMARY KEY  (name)
);

ALTER TABLE `cpg15x_cms` ADD `pos` int(11) NOT NULL default '0';
ALTER TABLE `cpg15x_cms` ADD `type` int(11) NOT NULL default '0';
ALTER TABLE `cpg15x_cms` CHANGE `catid` `conid` int(11) NOT NULL default '0';
ALTER TABLE `cpg15x_cms` CHANGE `pos` `cpos` int(11) NOT NULL default '0';

ALTER TABLE `cpg15x_cms` ADD `modified` TIMESTAMP NOT NULL;
ALTER TABLE `cpg15x_cms` ADD `start` DATETIME;
ALTER TABLE `cpg15x_cms` ADD `end` DATETIME;

INSERT INTO `cpg15x_cms` (conid,title,content,type) VALUES ('0','Welcome to Coppermine', 'Simple test of CPG MiniCMS','0');
INSERT INTO `cpg15x_cms_config` VALUES ('dbver', '0.0');
INSERT INTO `cpg15x_cms_config` VALUES ('redirect_index_php', '');
INSERT INTO `cpg15x_cms_config` VALUES ('related_size', 'thumb');
INSERT INTO `cpg15x_cms_config` VALUES ('editor', 'fckeditor');
INSERT INTO `cpg15x_cms_config` VALUES ('rss_enabled', '0');
INSERT INTO `cpg15x_cms_config` VALUES ('rss_description_length', '50');
INSERT INTO `cpg15x_cms_config` VALUES ('rss_include_image', '0');
INSERT INTO `cpg15x_cms_config` VALUES ('rss_image_size', 'thumb');


UPDATE `cpg15x_cms` SET `modified`=NOW() WHERE `modified`='0000-00-00 00:00:00';

# Cleanup - Values that shouldn't exist anymore:
ALTER TABLE `cpg15x_cms` DROP `pos`;

# Write this dbver to the config table
# This should match the DBVER constant in init.inc.php
UPDATE cpg15x_cms_config SET value='1.5.20' WHERE name='dbver';