benz001
Forum Replies Created
-
Forum: Plugins
In reply to: [Viper's Video Quicktags] "flickr video" is not a valid shortcode name+1 to this, others have been commenting out the shortcode definition to resolve the error,
eg https://github.com/montreyw/Theme-Redesign-and-SEO-Overhaul/commit/223c49777ada49af4a794b272f100b2d949e2006Forum: Plugins
In reply to: [Wordpress Instagrabber] Only a few images show on User Stream, none for tagsAs a follow up, I deleted all streams, reset my secret in Instagram, recreated the user stream and set the earliest date to be only 4 days ago.
This time I got 20 images, but no more – again there are many more images in this time frame that should have come through (around 40 ~ 45), is there a debug log or anything I can post up to assist with diagnosing this?
Thanks!
Thanks Otto, it doesn’t seem to anymore – now it presents as a “Create Facebook Page” button that generates a new ‘community page’, which is described as not a regular page but rather an app specific page with a bunch of app related links/buttons that allow users to block the app/play the game etc.
You can’t use an existing facebook address for this page and there’s no UI to specify any sort of redirector before hitting it – the only action you can do is create or delete the community page.
I’m still waiting to see if the name change hack works – it’s been 24 hours so far and it’s still not showing up, but surely even facebook have to respect a name change and flush a cache eventually!
Forum: Plugins
In reply to: [W3 Total Cache] Invalid mfunc tag syntaxAgreed, I’m not fond of littering html comments with php code.
I know the call environment issue is why WP Super Cache has a late initialisation mode flag, so it can load the WP stack before running the mfunc blocks, haven’t found out how total cache deals with this yet – but it’s obviously a double edged sword as the entire point of caching is to not have to run the entire stack…
I think the only real answer will have to be lazy loading fragments via ajax and abandon mfunc all together.
Forum: Plugins
In reply to: [W3 Total Cache] Invalid mfunc tag syntaxHi Shush, that’s a definite improvement over my example – but still a great demonstration of the problem I’m trying to describe.
When I turn caching on I no longer see “This happens when caching OFF”, so again the code has to be be duplicated to get the expected output – you write it once inside the opening mfunc bracket and then a second time between the mfunc wrappers.
This isn’t a drama for trivial statements but for longer code blocks it makes testing, debugging and change management a nightmare – particularly as the mfunc called environment isn’t the same as the regular wordpress environment – so the same code may or may not work.
I’ve been trying to think of a combination of comments and echos that would get the same result with only one php statement but I just don’t think it can be done.
Forum: Plugins
In reply to: [Yoast SEO] [Plugin: WordPress SEO by Yoast] Disable Canonical URL'sIt would be great to hide them, but I’ve found I can work around most problems with dynamic urls from custom post types/taxonomies by setting explicit canonical URLs for them.
It wasn’t immediately obvious how to do this (at least to me). Go to Yoast SEO > General Settings, untick the checkboxes against the problem post types and taxonomies. Then you can go to the custom taxonomy screens and edit the individual terms, you can put in a custom canonical URL there.
This doesn’t help when you hit the root url of a custom post type, I can’t find a setting for that one, but any path through a category/tag/custom taxonomy to pages with using a custom content type can be manually overridden this way.
Forum: Plugins
In reply to: [W3 Total Cache] Invalid mfunc tag syntaxI’ve been struggling with the docs on this as well. Essentially the <!– mfunc –> tags appear to be replacing the <?php ?> tags.
What I believe happens is that the cache parser hunts through the code for mfuncs in the saved cache file then runs php against their contents at run time by throwing them into an output block.
So essentially you need to think of it as outputting your dynamic php code into the contents of an html comment tag, the cache engine will find the comment block in the cached page and turn it back into php at run time.
So if you have the following in your template:
<!-- mfunc echo "Hello World 1<br/>"; --><!-- /mfunc --> <?php echo "Hello World 2<br/>"; ?>
When caching is enabled you’ll get:
Hello World 1
Hello World 2
when it’s disabled you’ll just get:
Hello World 2.What I can’t figure out is a way to avoid writing the code twice, you have to do it once in the mfunc for caching and then again outside the mfunc for un-cached versions – and if caching is enabled but the page is not cached (eg if you are logged in as Admin) then both blocks will appear on the page!!!
Forum: Plugins
In reply to: [Plugin: Simple Facebook Connect] Bug with Custom post types and publishI suspect you’re right with the plugin combo theory, but just to clarify: it’s not the editor content that’s wrong – it actually loads completely the wrong post, but with the right URL.
So wrong title, wrong media, wrong content, wrong taxonomy data, wrong meta values etc.
It’s as if it’s corrupting the global $wp_query for custom post types or just replacing the global $post var with a different post.The post it serves up is of the correct post type but it’s a different post.
The module also detects an error – on the custom page I see this in the metabox “If you can see this, then there is some form of problem showing you the Facebook publishing buttons. This may be caused by a plugin conflict or some form of bad javascript on this page. Try reloading or disabling other plugins to find the source of the problem.”
If I activate the publish option but comment out the contents of the sfc_publish_meta_box function it works, with a bit more digging I’ve traced it to line 120 in that file
// look for the images/video to add with image_src $images = sfc_media_find_images($post);
The problem first occurs on the call to sfc_media_find_images() – but that’s as far as I’ve got, as soon as I started var_dumping $post inside that function the problem vanished.
Thanks for the git link and I hear you on the FB issues!
There is an (almost) duplicate post on SO that states that the FB documentation explicitly allows multiple og:image tags, but I’ve never been able to find the spot in the FB documentation that says that myself – I’ve always found their docs an absolute nightmare too and validating that they really do what the docs seem to say is even worse….
Wow – awesome stuff!
I’ve also been looking at the og:image code, basically I’m not using the extension as is because as soon as you give facebook an og:image it stops scraping the page for images, meaning that people can no longer pick an image to share other than the first in the post – and for a blog post with multiple images in it that really sucks.
There is some discussion on stackoverflow that if you supply multiple og:image tags facebook will index all of them, last time I tried this on another platform (6+ months back) it didn’t seem to work, but the facebook linter didn’t flush the facebook cache back then so testing was a nightmare.
However it does now and it would be easy to iterate through the images array from that regex and put all the images as og:image tags.
Would you consider putting the code in Github so I can fork it? Much better than me just hacking my copy and leaving no trace of what’s been tried for the rest of the community ??
So the quick fix is something like:
echo "\t<meta property='og:description' content='".esc_attr(substr(strip_tags(strip_shortcodes($post->post_content)), 0, 160))."' />\n";//BGE added strip_shortcodes
I’ve not tested that thoroughly yet however.
Forum: Fixing WordPress
In reply to: Why can't "Large" images exceed 1024 height?!?Also check your Settings > Media for max height and max width, mine were both set to 1024
Forum: Fixing WordPress
In reply to: Edit Posts – Sort PluginThanks Shane,
That plugin allows you to manage the sort order on the front end, what would be great is more powerful sorting on the back end for the admins.
The basic filters in the edit.php page are a good start, but they are filters not sorts, ie if you click on a category name you will see only posts in that category, but they are still displayed chronologically.
You also can’t build up compound rules very easily eg “show all posts in category ‘books’ with tag ‘paperbacks’ and written in the last 6 months, sorted by author”.
And before anyone else chimes in, yes I realise you can ‘AND’ together a category and a tag by first filtering the category then clicking the tag name, but the UI is pretty inconsistent here (why are categories in the top boxes but not tags???) and once you have a lot of articles its just not rich enough.
You also can’t create any kind of OR filter at all.
Forum: Fixing WordPress
In reply to: Show sticky posts in selected category at the topYou need to include the category in the query, using query_posts() as you have above overides the default query.
This post may be the answer you are looking for
https://www.ads-software.com/support/topic/272324?replies=2Forum: Fixing WordPress
In reply to: Current URL Under the PostWatch out – this will only work if the_permalink() is called from inside the loop. If you call it outside the loop you’ll get a link, but it won’t be for the current page!