Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Favorites Help. Upgraded to 2.1.1  (Read 7960 times)

0 Members and 1 Guest are viewing this topic.

JCphotog

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 115
Favorites Help. Upgraded to 2.1.1
« on: September 01, 2007, 07:00:10 pm »

Hello.  I'm still very excited by cpmFetch.  Recently I've had a need to display user favorites. I tried and instead random photos were displayed.  After searching a few other topics, I decided to upgrade to 2.1.1  all of my random photo blocks in tiny portal display just fine, but my test page in the portal gives me an array error, yet it still displays the apropriate favorite images.

I'd love some insight into the matter.  Here's the error that I get:

Code: [Select]
Array ( [0] => Array ( [user_id] => 2 [user_favpics] => YToxODp7aTowO2k6NDc1O2k6MTtpOjIxO2k6MjtpOjExMDtpOjM7aToxODc7aTo2O2k6MTE7aTo3O2k6NjUzO2k6ODtpOjM3NzI7aTo5O2k6MjY7aToxMDtpOjI4O2k6MTE7aToyOTExO2k6MTI7aTozNzk2O2k6MTM7aToxODQ7aToxNDtpOjM1ODg7aToxNTtpOjM1MTk7aToxNjtpOjE5NTE7aToxNztpOjE5NTM7aToxODtpOjIxMzc7aToxOTtpOjIxMzY7fQ== ) ) parsing

here's the code I tried to use:

Code: [Select]
echo '<center>';  include_once "/home/public_html/gallery/cpmfetch/cpmfetch.php"; 
  $objCpm = new cpm("/home/public_html/gallery/cpmfetch/cpmfetch_config.php");
  $options = array( "cellattributes" => array("align" => "center","height" => "105", "width"=>"110"), "cellStyle" => "align='center'"  );
  $objCpm->cpm_viewRandomMediaFrom("cat=1,3:favorites=2,3,4", 6, 1, $options);
  $objCpm->cpm_close();
echo '</center>';

If it helps, I'm running this in a php article in SMF and Tinyportal
Thanks for everyone's help.
« Last Edit: January 28, 2008, 09:36:47 am by Joachim Müller »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Favorites Help. Upgraded to 2.1.1
« Reply #1 on: September 01, 2007, 09:00:56 pm »

That may have just been a debug statement left in there... Is there anything after "parsing" ?
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

JCphotog

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 115
Re: Favorites Help. Upgraded to 2.1.1
« Reply #2 on: September 02, 2007, 04:31:16 am »

Sorry for the delay.  I was out of town for the afternoon.
Interesting.  I don't see anything. Here's the link. To a test page.
Logged

JCphotog

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 115
Re: Favorites Help. Upgraded to 2.1.1
« Reply #3 on: September 03, 2007, 07:50:28 pm »

Any thoughts on where I should look to solve this? 
Logged

JCphotog

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 115
Re: Favorites Help. Upgraded to 2.1.1
« Reply #4 on: September 03, 2007, 09:15:32 pm »

I just noticed one other glitch. I didn't test things fully, so after upgrading, now the links take you to the album instead of the actual image. 
Logged

JCphotog

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 115
Re: Favorites Help. Upgraded to 2.1.1
« Reply #5 on: September 06, 2007, 02:03:57 am »

Hi guys. I'm still at a loss. I tried re-uploading 2.1.1, and I re-ran the install script.

I still get this error:
Code: [Select]
Array ( [0] => Array ( [user_id] => 2 [user_favpics] => YToxODp7aTowO2k6NDc1O2k6MTtpOjIxO2k6MjtpOjExMDtpOjM7aToxODc7aTo2O2k6MTE7aTo3O2k6NjUzO2k6ODtpOjM3NzI7aTo5O2k6MjY7aToxMDtpOjI4O2k6MTE7aToyOTExO2k6MTI7aTozNzk2O2k6MTM7aToxODQ7aToxNDtpOjM1ODg7aToxNTtpOjM1MTk7aToxNjtpOjE5NTE7aToxNztpOjE5NTM7aToxODtpOjIxMzc7aToxOTtpOjIxMzY7fQ== ) ) parsing  Any thoughts about where the debug tag might be?

And for some reason when you click on a picture it links to the album. 
If you'd like to see the problem in action, follow this link.

Thanks again for all of your efforts.
Logged

JCphotog

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 115
Re: Favorites Help. Upgraded to 2.1.1
« Reply #6 on: September 07, 2007, 05:29:37 am »

If it helps, I checked the error log, and I get the following error:

Quote
Notice: Only variables should be assigned by reference in /home/jessec2/public_html/artdc/gallery/cpmfetch/cpmfetch.php on line 419
  Any other thoughts?  Any ideas of what I can do to track down the cause of the problem?
Logged

xchanius

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Favorites Help. Upgraded to 2.1.1
« Reply #7 on: October 24, 2007, 12:31:36 am »

I'm having the same issue. Working with the Dev Version 2.1.1 and CPG 1.4.13.

This piece of code:

$results = $objCpm->cpm_viewLastAddedMediaFrom("favorites=2672",1,$numResults);

returns the correct results, but also outputs this piece of text:

Array (
  • => Array ( [user_id] => 2672 [user_favpics] => YToxOntpOjA7aToyNDQ2OTt9 ) ) parsing


So it does appear to be some sort of debugging type deal.

Is there some way of turning this off? It's screwing up my JSON feed.

Thanks.
Logged

xchanius

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Favorites Help. Upgraded to 2.1.1
« Reply #8 on: October 24, 2007, 12:36:44 am »

Ok, found the bug in 'cpmfetch_dao.php'.

Line 1055 and line 1059 need to be commented out (I've commented them out in this example):

$pidlist = array();
//print_r($this->resultArray); THIS ONE
   foreach ($this->resultArray as $row) {
   // decode the info
   $thispersonslist = unserialize(base64_decode($row['user_favpics']));
   //print "parsing"; AND THIS ONE
Logged

JCphotog

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 115
Re: Favorites Help. Upgraded to 2.1.1
« Reply #9 on: January 28, 2008, 06:02:08 am »

Hey.. this looks like it fixed it for me too!  Now if only the images linked to the pics, and not the albums..
Progress!  Great progress!  Thanks.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.