MiniCMS for CPG 1.6.x - Page 2 MiniCMS for CPG 1.6.x - Page 2
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

MiniCMS for CPG 1.6.x

Started by gmc, November 02, 2018, 03:20:44 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

sharpo

Thanks Greg,

I've removed that line for my 3 live galleries, hopefully that's fixed it for me. I'll leave the test galleries as they are and let you know if any of those have a problem - it's more to keep you informed than anything, as they're of no real importance to me.

Oh, did you notice on my live galleries (if you looked) that I have used MiniCMS to aid new visitors, with icons to shows slideshow and lightbox icons?? I thought it was a good idea!!!
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

ron4mac

Quote from: gmc on November 22, 2018, 03:35:51 PM
Still a mystery to me why it seems install is getting driven.

codebase.php, line 80:
function minicms($content='')
{
    global $MINICMS, $CONFIG, $cat, $album, $REFERER, $lang_minicms, $HTML_SUBST_DECODE, $cms_array;

    if ($MINICMS['dbver']!=MINICMS_DBVER) {
        echo "<h2>{$lang_minicms['minicms_full']}  ..........
        minicms_configure(false); //auto-updater and dont print the "go" button
    }


I think minicms() might be getting called without MINICMS_DBVER having been defined first (as in cms.php ... although that doesn't seem to get used).

sharpo

It has happened again!

I had edited the file as per a previous post and part of it now looks as below with a line removed:-

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


INSERT INTO `CPG_cms_config` VALUES ('dbver', '0.0');
INSERT INTO `CPG_cms_config` VALUES ('redirect_index_php', '');
INSERT INTO `CPG_cms_config` VALUES ('related_size', 'thumb');
INSERT INTO `CPG_cms_config` VALUES ('editor', 'fckeditor');
INSERT INTO `CPG_cms_config` VALUES ('rss_enabled', '0');
INSERT INTO `CPG_cms_config` VALUES ('rss_description_length', '50');
INSERT INTO `CPG_cms_config` VALUES ('rss_include_image', '0');
INSERT INTO `CPG_cms_config` VALUES ('rss_image_size', 'thumb');


but if you look at http://www.sharpos-world.co.uk/cpg/ it has another 16 or so entries.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

sharpo

....and just to clarify, my edit was completed at 15.09 (or actually 16.09 due to the hour time difference setting I suppose) not long after the edit instruction was posted.

Mysql dates and time as below, and after the above edit:-

   Edit Edit   Copy Copy   Delete Delete   412    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 18:04:53    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   411    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 18:03:56    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   410    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 18:03:03    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   409    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:59:41    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   408    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:55:29    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   407    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:52:49    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   406    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:49:56    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   405    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:49:46    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   404    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:49:44    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   403    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:49:42    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   402    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:49:40    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   401    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:49:37    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   400    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:49:36    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   399    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:45:34    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   398    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 17:42:31    NULL    NULL
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

gmc

Quote from: sharpo on November 22, 2018, 07:26:33 PM
....and just to clarify, my edit was completed at 15.09 (or actually 16.09 due to the hour time difference setting I suppose) not long after the edit instruction was posted.

...
Without that SQL statement - even re-driving install wouldn't be able to add another record.
Ron may be onto what was driving it (not my plugin originally - so didn't know/recall about the automatic update...)
What is the setting of 'dbver' in the cms_config table?

But regardless - without the SQL statement - I have no idea how it would be still adding messages...
Could another gallery be pointing at the same database/cpg prefix??
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

sharpo

cpg       = Edit Edit   Copy Copy   Delete Delete   dbver    1.5.20
kc         = Edit Edit   Copy Copy   Delete Delete   dbver    1.5.20
BB3cpg = Edit Edit   Copy Copy   Delete Delete   dbver    1.5.20

my new 16 = Edit Edit   Copy Copy   Delete Delete   dbver    1.5.20

Looked at my 3 "live" galleries, as per my signature, and the newly installed 1.6 test - all are the same version.  All different databases though.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

sharpo

No more entries appeared for an hour or so, then at 19.08 more appeared, totalling about 70 now.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

gmc

Quote from: sharpo on November 22, 2018, 08:20:37 PM
No more entries appeared for an hour or so, then at 19.08 more appeared, totalling about 70 now.

Here's a bandaid...
In minicms/codebase.php, find: 

    $where = (isset($MINICMS['ID'])) ?  "ID='{$MINICMS['ID']}'" : "conid='{$MINICMS['conid']}' AND type='{$MINICMS['type']}'";
    $query = "SELECT * FROM {$CONFIG['TABLE_CMS']} WHERE $where ORDER BY cpos";

and replace with: (adding middle line...)

    $where = (isset($MINICMS['ID'])) ?  "ID='{$MINICMS['ID']}'" : "conid='{$MINICMS['conid']}' AND type='{$MINICMS['type']}'";
    $where .= " AND title != 'Welcome to Coppermine'";
    $query = "SELECT * FROM {$CONFIG['TABLE_CMS']} WHERE $where ORDER BY cpos";

Will stop the DISPLAY of the messages... but not the cause of them being created.

Are you sure no other gallery points to this database?
I don't understand how messages can continue to get added if the SQL to add it has been removed...
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

sharpo

I've been away from the computer all evening since adding that text at 19.30, but a quick look at mysql shows more has been added. I'll look at your post properly in the morning, but for now, the last few added are:-

Edit Edit   Copy Copy   Delete Delete   470    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 22:02:38    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   469    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 20:23:07    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   468    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-22 20:22:24    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   397    0    Welcome to Coppermine    &lt;p&gt;Simple test of CPG MiniCMS. Still got thi...    0    0    2018-11-22 19:30:52    NULL    NULL

The spacing looks odd but you can see the one I edited at 19.30 - which was the one at the top of the page on my gallery, forgetting any new ones would be added at the bottom end of the list.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

sharpo

This morning I logged into my main gallery and it looked like there were more messages, so I uninstalled MiniCMS. Since then I looked at your earlier post and made that edit, then reinstalled MiniCMS and the unwanted messages have been blanked out.

A few days ago I was trying to tidy up my web space etc. and was listing sites and names of databases linked to them - and no galleries share a database.

Looking at Mysql this morning, there had been more additions during the night when I was asleep - so they appear even when my pc is switched off, some of the more recent ones and it looks as if two can appear at exactly the same time. That's faster than anybody can physically uninstall and reinstall it:-

Edit Edit   Copy Copy   Delete Delete   494    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:45:41    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   492    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:45:11    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   493    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:45:11    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   490    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:45:01    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   491    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:45:01    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   489    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:44:30    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   488    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:41:36    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   487    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:40:30    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   486    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:40:17    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   485    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 07:40:03    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   484    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 06:02:47    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   483    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 05:49:06    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   482    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 05:48:38    NULL    NULL
   Edit Edit   Copy Copy   Delete Delete   480    0    Welcome to Coppermine    Simple test of CPG MiniCMS    0    0    2018-11-23 05:47:23    NULL    NULL
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

gmc

Quote from: sharpo on November 23, 2018, 11:26:27 AM
...
Looking at Mysql this morning, there had been more additions during the night when I was asleep - so they appear even when my pc is switched off, some of the more recent ones and it looks as if two can appear at exactly the same time. That's faster than anybody can physically uninstall and reinstall it:-
...
what Ron pointed to was code in minicms that drives a 'behind the scenes' update if the installed dbver doesn't match what the code expects.  It would be driven on a gallery view - not necessarily an admin uninstall/install.
Not a function that has been used much - as the dbver is still at 1.5.20 from minicms point of view.

Even so - I still am not understanding how the messages can keep getting added if the sql to add them has been deleted - and no other gallery shares the database.

Try V2.5 (and redo the last change to suppress the display of test message - as that isn't in the package).  That only issues the SQL to add the test message if the tables were just being created...
I'll try to find some time to walk the rest of the code and see what might be driving the update process.
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

sharpo

Righto, will try v2.5.

I was half way through typing when I realised you had posted a reply. Not really relevant but what I was going to say was:-

"You obviously won't see it now, but from 10.20 this morning to 11.32 the entries went up by over 100 and the latest entry is number 598 but no more appeared in the last 75 minutes.

I haven't been working on any of my galleries this morning and checking all of the Mysql databases it is only http://www.sharpos-world.co.uk/cpg/ that is having the problem at the moment, although the other two live galleries have had the problem a week or so ago."



Back to now, I will uninstall 2.4 then make that edit to suppress the test message, then delete all those 100+ messages that have appeared recently. Will report back when that is all done.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

sharpo

2.5 installed in that one gallery.

Reloaded page and all those messages showed again, then edited that file and reloaded the page and they were hidden. Finally deleted 202 of those messages from Mysql.

I will leave it a few hours then check the _cms file for that gallery and see if any more messages appear. The other galleries can be checked by refreshing the home page as haven't made the suppress edit for them yet.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

sharpo

Another 164 have appeared since my last posting here. I'll just keep deleting them on a daily basis until I hear what else to try next.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Αndré

Just a guess, but maybe those entries haven't been added by the plugin, but somehow else. Please try to disable/uninstall the plugin (or even better, delete the whole plugin folder from your server temporary) and check if new messages continue to appear in your database.

sharpo

Αndré,

I think I have "removed" the problem, at least I hope so. When upgrading to 1.6 I did something I have done before, which was to copy all the files for the gallery to a spare domain I have in my web space. A precaution in case I made a big mistake with the upgrade!! All the files were stored within a newly named folder that, in theory, would never be accessed as nothing would be directed to it.

A few days ago I "zipped" or compressed all the files within that folder and then deleted the files. Since then no more entries have appeared.

There have been other times when I have used that method without a problem - as it is so easy to switch folders back and forth and restore a database if I have had a problem with something. On this occasion though it seems to have gone wrong.

Do you think that was the cause of the problem?

Pleased to say though that, after that problem which seems to now be fixed, the upgrades have all gone well and the plugins I use are all working - although a few fixes were needed (all solved via this forum) to get things right.

Thanks to all who helped!!!
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Αndré

Quote from: sharpo on November 27, 2018, 08:51:07 PM
Do you think that was the cause of the problem?
Difficult to say, but if no more messages appear, it seems that this was the cause (strange anyway).

sharpo

Quote from: Αndré on November 28, 2018, 10:53:16 AM
Difficult to say, but if no more messages appear, it seems that this was the cause (strange anyway).
I'll watch for any more mysterious messages suddenly appearing - but still looking good at the moment. Will remember to zip it in future, or copy without config file - making sure I have a copy offline of course!!
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

AJDunford

Hello and thank you in advance for any help you can supply - I am not an expert, not even sure this is the correct place to seek support

I am trying to install minicms 2.5 on a fresh installation of cpg1.6

I get the following error:

Fatal error: require(): Failed opening required 'plugins/minicms/include/init.inc.php' (include_path='.:/usr/local/php-5.6.37-flock/lib/php') in /var/sites/c/***********/public_html/plugins/minicms 3/codebase.php on line 131

Any ideas?

Αndré

Please check if you have uploaded the plugin completely, as it seems at least the file in the error message is missing (or has wrong permissions).