Home User profile
tagDiv Member
I'm a 31-year-old programmer out of Dallas, TX. I use tagDiv products on a blog for personal use as a multi-author Dallas Cowboys fan-blog. I enjoy tackling problems and helping others when I can. *** I AM NOT A TAGDIV SUPPORT TEAM MEMBER *** I help out on the support forums as a hobby and am not affiliated with tagDiv or the Envato Marketplace.
Bryson T
tagDiv Member

It’s an ad. Is Newspaper ad-supported now?

Bryson T
tagDiv Member

Well, at the very least, yeah! We buy software to get away from ads, not to have them shown to every user on our sites, including those who have zero experience with or use for what’s being advertised. It makes us look bad. Is Envato raking you guys over the coals or something? After eight years, I’m curious why this changed.

Bryson T
tagDiv Member

@Bogdan-bScreenshot of newspaper 7.4 full source

I archive every version of the theme (since Feb 2014) carefully. I just unpacked the WP theme zip (full source) and here is what I have in /wp_booster/. Notice files are sorted alphabetically, ASC, and there is no td_options.php file in that archive. I’ve included my directory tree on the left so you can see where things are.

Not to argue or anything, but your statement appears incorrect. There is no /wp_booster/td_options.php file in 7.4, 7.3, 7.2, 7.1.1, 7.1, 7.0.1, or 7. I’ve checked my source downloads.

  • This reply was modified 9 years by Bryson T. Reason: Includes all versions from 7-7.4 missing the file in question
Bryson T
tagDiv Member

That missing is one problem, but apparently not the whole deal. Had a server error mess up the full theme source upload, or so I thought, but apparently some of it went through and that’s why I thought it worked just adding td_options.php. A second site I manage requried the full 7.5 Newspaper source to be uploaded. Patch no good, either way.

Bryson T
tagDiv Member

Okay, scratch that. That is one problem, but may be another still. Uploaded the full theme source on a second site running Newspaper because the one file didn’t fix it alone.

Sorry… wanted to edit or delete my last reply, but already timed out.

Bryson T
tagDiv Member

In the full theme source (not the patch folder), go to includes/wp_booster/ and upload td_options.php to the same location on your server. The 7.4 => 7.5 patch does not include this new file (new to 7.5), but it very much required, and essential to the theme. That fixed it for me.

Bryson T
tagDiv Member

As I was typing, the issue resolved itself. So, best I can tell, the problem is that you introduced a new file (includes/wp_booster/td_options.php) to the theme but forgot to include that file in the patch folder.

So, unzip the theme itself (Newspaper.zip inside the TF archive), then go to the above file and upload it to the correct place. Should be working then @nano2408.

Bryson T
tagDiv Member

I’m running into the following error after applying the 7.4/7.5 patch in dev and production.

`Access to undeclared static property: td_global::$td_options in /…/wp-content/themes/Newspaper/functions.php(22): require_once()\n#1
/…/td_wp_booster_functions.php on line 15`

That particular line goes to includes/wp_booster/td_options.php where it declares the static variable as NULL, $td_options (the options array being set up). Then checked again and both the original 7.4 source and my installation were missing the td_options.php file entirely, instead calling up td_global.php where 7.5 calls up td_options.php.

Working on it now with a full reinstall, including that file.

Bryson T
tagDiv Member

Blockquotes are a styled element so you just need to add some custom CSS to your Custom Code in the theme panel. Probably easiest to use inspector in your browser to copy the styles of the quote style you like, and then modify those styles for the classes of the default blockquote. It’s a bit of custom work but it’s not bad if you’re not new to CSS.

Bryson T
tagDiv Member

Cleared all caches on the site and server?

Bryson T
tagDiv Member

Thanks, @alin_vlad. I appreciate you reading along and seeing the problem.

Bryson T
tagDiv Member

The new mobile theme introduces a second editor for every page. Have you checked that? The new Mobile editor doesn’t directly support VC but I’ve found that if have a VC built page (like a home page), that you ca switch to the classic editor view (where it shows the VC shortcodes in the content) and copy that into the Mobile editor. This defeats the purpose of a mobile editor, but is needed sometimes.

Anyway, might check there first. If that’s not it, might help to include more detail in your request (posts, pages, do the header, sidebar, footer show up but no content? etc.).

Bryson T
tagDiv Member

Found the answer to the real problem, and it was simple.

Located in Newspaper/page.php on line 44

I added lines 44 and 46 in that file.

While building the array of shortcodes used to determine which template to use, I added a check for the string vc_, which is the beginning of all VC shortcodes (can’t use VC without first having a row, etc.) in the foreach loop, and only if that string is found does it add the item to the array that is later checked against the post content. This way, the automatic changes based on whether VC is used works as intended, and as clearly stated in the theme’s documentation.

Tested with several shortcodes and so far it’s only catching when an actual VC shortcode is used.

That is normal WordPress behavior.

Bryson T
tagDiv Member

if (is_array($td_page_builder_short_codes) && !empty($td_page_builder_short_codes)) {
foreach ($td_page_builder_short_codes as $short_code_name){
// we have to add [ before the shortcode name, else it may target simple words that match with the shortcode name
$short_codes_buffer[] = ‘[‘ . $short_code_name;
}
}
if (!empty($short_codes_buffer) && td_util::strpos_array($post->post_content, $short_codes_buffer) === true) {
$td_use_page_builder = true;
}

Bryson T
tagDiv Member

Everything else works as expected.

Problem is, on a fresh WP install with any other theme, the use of ANY shortcode in a page maintains the basic elements of a page template (title, body). Searching for ANY shortcode to decide whether or not VC is being used is a bug. To go by your own documentation:

Template settings

If VC is used, the page title will not show. I didn’t use VC and the page title didn’t show. You see where I’m going with this?

Whatever conditional is being used to check for a shortcode is not limited to a regex for VC only shortcodes and is tripping on any and every shortcode available. It essentially ruins the shortcode feature of the whole page system in WP. It modifies core behavior in a round about way that doesn’t actually change core code.

I can edit this myself, sure, and I can even keep maintaining it across updates, but that’s just a band aid for the bigger problem. This isn’t a localized issued. Also not a difficult fix… ** correction. It’s not a difficult fix for you because you know the VC methods used and how they cross with NP methods. Looking at the code, it looks like you’re depending on VC’s own internal array of shortcodes and then not filtering through them at all aside from adding the leading bracket to the shortcode names. Literally checking if it’s empty or not and nothing else…

`
if (is_array($td_page_builder_short_codes) && !empty($td_page_builder_short_codes)) {
foreach ($td_page_builder_short_codes as $short_code_name){
// we have to add [ before the shortcode name, else it may target simple words that match with the shortcode name
$short_codes_buffer[] = ‘[‘ . $short_code_name;
}
}
if (!empty($short_codes_buffer) && td_util::strpos_array($post->post_content, $short_codes_buffer) === true) {
$td_use_page_builder = true;
}
`

If it’s not going to be fixed, then the above screenshot shows text that must be changed, because ALL I’m wanting is for the software to do what it says there; if VC is used, no title, if VC is not used, page title. Simple.

Thanks.

  • This reply was modified 10 years by Bryson T.
Bryson T
tagDiv Member

Okay, so I’ve left my setup in learning mode 2-3 weeks and found something everyone should know. While in learning mode, you use the theme panel so Wordfence can learn to let the admin-ajax.php calls through, but it’s not that that simple.

Wordfence not only sets exceptions for admin-ajax.php, but for the parameters that are sent to it. Every setting in the theme is a different parameter.

So the way you have to use Wordfence with a tagDiv theme is simply to turn learning mode on during periods when you’re adjusting theme settings. When done, turn learning mode back off so you’re protected. Then, if you change a theme setting that you already used specifically in learning mode, it’ll always work, but if you get to a new one that you didn’t adjust while in learning mode, it will be blocked by Wordfence. That’s why you turn learning mode back on.

I admit, it’s a slight pain to go back and forth, but having this great theme with good security? Can’t beat that.

Hope this helps.

  • This reply was modified 10 years by Bryson T. Reason: Typo
Bryson T
tagDiv Member

Upgraded the other day and haven’t had an issue; revamped my ad codes for mobile yesterday too. Not all setups were created equally. @mehrdad That may be true, but I doubt that was the only way.

Bryson T
tagDiv Member

@garridod Probably not. I actually changed servers in that same span of time too and that didn’t play a part. Just the lack of need to fuss with theme settings during the first learning period. Kind of goofy that another plugin can be so… intrusive? Oh well. Easy enough to fix.

Bryson T
tagDiv Member

Sure, @garridod, glad to help.

The way that’s supposed to work is that it figures out what’s normal in learning mode so the firewall doesn’t block your theme and plugins from working. So keep it in learning mode for a week or so, be sure to update themes settings a few times (don’t think it matters if you change anything, as long as you save settings and trigger that action a few times), then when learning mode is off again, it should work fine.

If that doesn’t fix it, then you need to contact Wordfence developer about learning mode not seeing the theme.

Bryson T
tagDiv Member

Having this issue now as well. First time this morning since Feb 2014 with Newspaper. I also use Wordfence and have since Oct 2015 with no issues. No updates to Wordfence in a few days, or any other plugins.

I haven’t adjusted theme settings in a while so I wasn’t seeing it, but the latest version of Wordfence includes a new Web Application Firewall feature (WAF) that is causing the issue.

I did some research and the plugin’s WAF is causing this sort of problem with many themes and plugins. The plugin author suggests turning “Learning Mode” on for the WAF for a week or so. Soon as I did that, the theme’s setting panel began working fine again. WAF is blocking access to admin-ajax.php best I can tell. I’m testing this with Newspaper and WPeMatico, which is also having the same issue.

Go to Wordfence -> Firewall and set it to learning mode (http://prntscr.com/awng8a) for a while and make changes to your theme settings while in learning mode. It’s supposed to study normal use and creates exceptions based on it.

They claim the WAF goes into learning mode when first installed, but if you’re like me and have a stable site with no need to modify theme settings, then you didn’t let it see the theme’s setting panel being used in learning mode. Which is why the issue has happened. Has nothing to do with Newspaper itself.

To be clear, the rest of Wordfence is fully compatible with Newspaper, and should be working with Newspaper and WAF after it has time to create exceptions for the theme as well.

Hope this helps.

Bryson T
tagDiv Member

I do, yes.

Bryson T
tagDiv Member

I was aware of the sppeds, but not how hosts treat it. Thanks for the tip, Chris. I’ll contact them today.

Bryson T
tagDiv Member

Can’t use WP Rocket though… conflicts with some tracking codes used for ads. Or at least my ad people tell me. Shame too, because I’ve heard good things about it.

Thanks for the tip, tho.

Bryson T
tagDiv Member

That did the trick. Counter plugin working perfect again on all networks. Thank you, Radu!

Bryson T
tagDiv Member

Regarding the flush calls, since that’s in TGM I don’t know if that counts. Doesn’t seem to me that code is run on every front end page load to throw W3TC off. But you tell me?

Right now I’m using W3TC with just the reverse proxy, browser, and database cache modules active. That’s with a very lightly applied Varnish cache (doesn’t do much for WP without page caching activated), apache, nginx, and APC running. It’s actually a smaller server at the moment, but handled some better loads yesterday. Using SSDs. I’m going to upgrade it in the next week or so, which will help.

My main concern with speed for mobile (more than half my traffic is mobile) and a caching plugin that doesn’t hold stale pages. WPSC tends to not update the front page cache for half an hour after a new post is published. I’ve used it with Newspaper.

Viewing 25 posts - 1 through 25 (of 286 total)