Jump to content


Photo
- - - - -

Default Pagelines-Ads Features keep replicating themselves!!!!


  • Please log in to reply
40 replies to this topic

#1 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 19 May 2012 - 02:46 AM

UPDATE: The solution, or at least a suggested cause, can be found at

Please Login or Register to see this Hidden Content

Evidently there are some out-of-date plugins that can cause this behavior... although why the behavior would have showed up after I updated the plugins is elusive. Original text follows:


At least so far this is an unpleasantly random bug with too many uncontrolled variables, but...

I updated the plugins in my WordPress installation this afternoon. Then I installed and configured WPML to work with another URL that points to the same installation files.

Now, about five times in the last six hours, something in the system... not sure exactly what... adds the sample PageLines Features items (e.g. PageLines Framework, Drag&Drop Control, Add-On Marketplace, etc., with the large black background images.) When I go in and delete them (confirming they're gone on both the English and Dutch sides of WPML they stay gone for a while and then they show back up again, sometimes with yet another set of duplicates.

In case that's not clear, the first time it happened I deleted six. Next time 12. Next time 18, etc. Not fun.

Even less fun since the Add Link to Facebook plugin dutifully posts them, all of them, as updates on Facebook. Which makes both my client and PageLines look like spammers.

I've disabled Add Link to Facebook so at least my site isn't a mini spam generator.

I know this is an unforgivably vague support request. And I'll continue to test to see if I can generate a reproducible script. But meanwhile is anybody familiar with this sort of behavior?

Thanks!

#2 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 19 May 2012 - 05:36 AM

Made it happen again with a fresh restore-from-backup. Still can't reproduce but working on it. Further investigation suggests this is caused by one of WPML's supplemental modules. If so then naturally I'll report the problem there. Continuing to investigate.

#3 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 19 May 2012 - 03:11 PM

Okay, let us know what you find out.

#4 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 22 May 2012 - 01:25 PM

Actually this is kind of ticking me off. I've spent a number of hours I can't in good faith bill for trying to track down a PageLines bug that... really shouldn't be there in the first place. (I can't bill them because I'm the one who recommended the combination of PageLines with WPML.)

Query: How do I disable the code that generates PageLines-branded @$%#^!% sample pages, features, boxes, etc. so my clients don't have to worry about their site (and Facebook Fan page!) getting spammed with dozens of duplicated sample Features or other sample entities?

Query: How fragile, exactly, is the PageLine's sample-generating script's error-checking code that it can't prevent itself from arbitrarily executing when user-generated Features already exist on a live site!?!?!?!

Query: How quickly could you release a revision of PageLines that, oh, say, adds one SQL query and a couple of lines of code to the theme installation code to see if there might be existing PageLines Features content types before creating new ones?

Not to sound touchy but adding that error check would solve both the problems I initially reported: PageLines-branded sample Features being generated in the first place and multiple sets of PageLines-Branded sample Features being generated over and over and over.

It would also have saved me a number of hours, and apologies to my client for a show-stopping bug, and apologies to my client's users and Facebook fans for using a commercial theme that repeatedly spammed their site and fan page. Oh, and of course apologies to my clients for further delaying the original task of installing WPML so they translate their site! (It has not improved my mood that another vendor snarked to my client "well that's what you get for using contributed code!" Except, of course, PageLines is commercial, not contributed.)

For the record in my instance the duplicates do appear to be created at... some point... while configuring and/or initially using some element of WPML. But since other cases of the same behavior have been reported -- and not corrected! -- it's kind of silly for me to try and chase down the exact trigger when, really, a tiny bit of error-checking code in the installation function would eliminate all instances.

#5 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts
  • LocationWV
  • Country: Country Flag

Posted 22 May 2012 - 03:05 PM

Are you trying to delete the default features? I have heard of people running in to issues when they delete them. Usually it's best to just leave them and create a new feature set with your features and just ignore the default ones. I did read your update at the top of this topic. Did you figure out which plugin is causing this issue on your site?

#6 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 22 May 2012 - 09:42 PM

I didn't figure out which plugin was causing the problem other than it seems to have something to do with either activating or using one of the main WPML plugins. It may or may be one of the other plug-ins we use, one of which could possibly be out of date. But again, I'm kind of done with testing and now I'm just (very!) cranky.

Not knowing any better, I guess, when I first installed the theme sometime last Winter I deleted the example content from PageLines and created new Features using content from my client. Also not knowing any better I used the, well, default feature-set name. (It might be a good idea to update the manual, and maybe the configuration theme configuration screens, with that warning about not deleting the samples and creating new ones instead. Particularly if by deleting them there's a non-zero chance that they'll arbitrarily, involuntarily, and repeatedly recreated!)

I'd still like to know if there's a feature, function, patch, or plain-old piece of code I can use to disable the "insert new samples into an existing website" feature. Because while I'm fine with using a different set for features my client is actually wants me to create I'm not fine with Pagelines later deciding it's a good time to repost them. Particularly since, as I mentioned earlier, the Add Link to Facebook plugin (sensibly!) cross-posts added content to the client's Facebook page and from there to their Twitter feed.

But really, if you could pass the word along to the developers, there shouldn't be a circumstance -- not even with the worst-behaved or most-obsolete 3rd-party plugin -- for any commercial theme to insert its own sample content after original content of the same type has been created. Especially since I'm pretty sure it wouldn't take much code to do the check first.

Hope I don't sound too gruff about this.

#7 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 22 May 2012 - 10:24 PM

David, sorry you are having issues with a plugin duplicating posts. Our section code does indeed check before adding content, for example, for boxes it runs this: get_posts('post_type=boxes') if there is no result it adds the default boxes. Its that simple. If plugins are messing with the wordpress get_posts() function we have no control over that.

#8 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 23 May 2012 - 03:16 PM

@Simon: Is there any chance you could instead do a check on your own metadata? For instance how likely is it that I or anyone else would want PageLines to install/reinstall sample content after they'd entered their account credentials? The benefit to that would be that the account and other PageLines metadata is all yours and thus unlikely to be affected by external code the way get_posts() evidently can be. Thanks!

#9 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 23 May 2012 - 05:50 PM

Yes that is what the get_posts does, looks for special posts with post_type boxes. The default post data is stored in the post_meta for those posts. You cant check for meta_data without a post ID, and that is what the check is doing. This problem has come up maybe 2 or 3 times in the last year ive been here, every time ive asked people to disable plugins until they find the offending plugin. Nobody has ever given us any further info and we have never been able to replicate it.

#10 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 24 May 2012 - 07:23 PM

@Simon: Sorry to keep bugging you like this. I'm in the process of disabling out-of-date plugins and enabling WPML + PageLines on a test server. If nothing bad happens then I'll try it on the production server. (WIth "Add Link to Facebook" disabled just in case.)

While looking through the code for badly behaved plugins (which I'm still committed to finding alternatives for or doing without) it occurred to me that I could also manually disable the sample-features creation code. (Believe me, I don't want to get another call late Friday night saying "our site and/or Facebook page has 50-60 Pagelines sample posts, what are you going to do about it?")

So!

Just to add a belt and suspenders I'm wondering in addition to disabling old plugins if there's a graceful way to disable the default_posts function around line 867 in sections/features/sections.php? Perhaps by just commenting out the line beginning with "return apply_filters..." on line 927?

Thanks.

#11 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 24 May 2012 - 07:34 PM

just comment this line: $this->post_type_setup();

#12 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 25 May 2012 - 03:37 AM

@Simon. Thanks! I've done a massive cleanup of the client's out-of-date plugins, I've found newer ones that ought to work at least as well. (And shouldn't trigger sample-recreation!) And I've commented out the line you suggested. For good luck. And also, of course, because the site's in production! I appreciate your help! David Innes

#13 Danny

Danny

    Is Awesome!

  • Moderators
  • 15242 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 25 May 2012 - 08:04 AM

Hi David, Is this issue now resolved ?

#14 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 27 May 2012 - 03:40 PM

@Danny,

I'd like another 24 hours or so to make sure. I'm just starting to start translating the second site with WPML, and that seemed to be where things got triggered the first time 'round.

Oh. Dumb question. Is there an possibility that just coming in with the 2nd-language URL would reinsertion of sample code? The U.S. version is healthysenseofself.com, the Dutch URL is (or will be once I set things up again) will be weesuzelf.com. Probably not because you'd have gotten previous reports. But I had to ask.

One thing, when I used @Simon's suggestion and commented out "$this->post_type_setup();" it entirely disabled Features from the sidebar. I actually want features on our site, I just don't want PageLine's features on our site. Especially not multiple instances.

So I commented out the return code in default_posts(). Hope that works. (I guess an alternative would be to replace your default content with my client's in the sample code -- that way if it ever did get triggered at least it would be something their viewers would expect. :-)

Again, I should know more sometime on Monday after I finish configuring WPML and begin inserting translated content.

I won't really be happy till I feel it's safe to re-enable "Add Links to Facebook."

Thanks!

#15 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 27 May 2012 - 04:53 PM

I'm not entirely sure about the 2nd-language URL code, but yes, please let us know more of what you learn tomorrow.

#16 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 29 May 2012 - 02:14 AM

Grrr... I just got a report from a member of the client's staff that she deleted a couple of extra Facebook cross posts that had popped up in some kind of association with the 2nd-Language version. One of which was allegedly a Pagelines sample feature. Good initiative on her part but I really wish I could have seen exactly what she saw. At the moment I'm going to call that a fluke. But I don't think I'm ready to close the report yet. #%!#@%! Sorry about this.

#17 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 29 May 2012 - 02:56 AM

So I commented out the return code in default_posts().


^ What happened with this? (I assume it didn't end up working out...)

#18 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 29 May 2012 - 03:24 AM

Yup. Confirmation. Not sure why but it's doing it again but for some reason around 4:00PM (Pacific time) our site started coughing out Pagelines spam on Facebook again. As I mentioned earlier I got a heads up from the client's group assistant who'd deleted a second batch at 7:00 PM (Pacific Time.) They're being attributed to our WPML translation site, which I guess is an improvement over being attributed to our main site. What's new this time is that they're being sent to Facebook even though they're not being inserted anywhere in our WordPress database!

Anyway, I checked back in on Facebook a few moments ago and saw the following:


HealthySenseOfSelf
37 seconds ago via Healthy Sense of Self
Een Gezond Zelf Gevoel ?„?

Drag&Drop Control
healthysenseofself.com
Control the structure of your site using drag and drop functionality. Pro web design has never been easier.

---

38 seconds ago via Healthy Sense of Self
Een Gezond Zelf Gevoel ?„?

PageLines Framework
healthysenseofself.com
The world's first ever drag-and-drop framework designed for professional websites. Build beautiful sites faster.

---

HealthySenseOfSelf
40 seconds ago via Healthy Sense of Self
Een Gezond Zelf Gevoel ?„?

Add-On Marketplace
healthysenseofself.com
Load up your own sections, themes and plugins using PageLines' one of a kind extension marketplace.

HealthySenseOfSelf
2 minutes ago via Healthy Sense of Self
Een Gezond Zelf Gevoel ?„?

Drag&Drop Control
healthysenseofself.com
Control the structure of your site using drag and drop functionality. Pro web design has never been easier.

---

HealthySenseOfSelf
2 minutes ago via Healthy Sense of Self
Een Gezond Zelf Gevoel ?„?

PageLines Framework
healthysenseofself.com
The world's first ever drag-and-drop framework designed for professional websites. Build beautiful sites faster.

---

HealthySenseOfSelf
2 minutes ago via Healthy Sense of Self
Een Gezond Zelf Gevoel ?„?

Add-On Marketplace
healthysenseofself.com
Load up your own sections, themes and plugins using PageLines' one of a kind extension marketplace.

---

HealthySenseOfSelf
11 minutes ago via Healthy Sense of Self
Een Gezond Zelf Gevoel ?„?

Drag&Drop Control
healthysenseofself.com
Control the structure of your site using drag and drop functionality. Pro web design has never been easier.


And so on.

Clearly something isn't working.

I think the fix I was trying earlier, where I just commented out

return apply_filters('pagelines_default_features', array_reverse($posts));


Wasn't cutting it as, I think, enough of a post was being generated to trigger Add Link to Facebook's cross-post code... but I guess without the return code it wasn't being inserted in to the database. Does that sound like a reasonable guess?

Anyway, what I've done now is
- Disabled Add Link to Facebook (this is *not* an optimal solution for a site with 16,000 Facebook fans... but it sure beats spamming all 16,000 of them with repeated and repeated and repeated ads for PageLines!)
- Gone into sections/features/sections.php and commented out all the code in update_default_posts() and default_posts()
- Gone a bit further and also commented out "$this->post_type->set_default_posts( 'update_default_posts', $this );" in the function post_type_setup()

That's a lot of... pretty robust code you've got in there for making sure you get those sample posts inserted. You've even got a separate function to make sure they're updated should they somehow get out of date!

I may just not be good enough at reading PHP to be able to tell where you do the error checking to see if there might already be previously-existing features on an in-production website before you either a) add or B) update them with your own sample set!!!!

Finally, for the record, I'm not sure this is a matter of having out of date plugins.

Remember. I actually want to use Features -- just not your sample features! For that matter I want to use PageLines! But I also need to use Add Links to Facebook and WPML with the translated versions hosted on native-language domains.

#19 davidi

davidi

    Member

  • Members
  • 18 posts

Posted 29 May 2012 - 03:27 AM

Also, seriously, it's a holiday weekend here in the U.S. and so there's really very little client activity going on. So I'm wondering what even might be spontaneously triggering these outbursts of activity -- sometimes after 24 hours of no problems at all. Then 3 hours later. Then an hour later. Then six minutes after that. Then two minutes after that. Then again after yet another two minutes. I mean... there isn't any author activity, there's no cron jobs, WordPress is decidedly not Drupal and so it doesn't trigger its own pseudo cron jobs. So... what the heck?

#20 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 29 May 2012 - 04:17 PM

Can you give me a list of all your active plugins then? So I can install all of them. WPML creates a mirror post for all posts created, in the 2nd language, maybe this has something to do with it, i really dont know. Can you just turn off post duplication for certain post types? Or does WPML just have one button for all posts/post_types?