Peter Knight
-
Posts
1,375 -
Joined
-
Last visited
-
Days Won
5
Posts posted by Peter Knight
-
-
-
I'm getting an error 403 Forbidden when a superuser tries to view any unpublished page and I'm trying to track it down.
If I goto Access > Roles > superuser I don't see any permissions but note the "Note: superuser role always has all permissions, so permissions field is not shown."
If I visit Access > Permissions > Page View, I don't see anything that is unticked etc
I then thought it might be a permission issue on a template level but there's no template-level permissions set there either.
Any ideas on next steps?
Thanks
-
33 minutes ago, Wanze said:
That's because the opposite (index,follow) is assumed by default and you do not need the meta tags at all in this case. The module does only render them if you have checked at least one (noindex or nofollow).
Thanks. I updated my post just before I saw this. Never realised that!
- 1
-
17 hours ago, Wanze said:
Hi @Peter Knight,
$page->seo->robots->render() should work fine, but it only outputs the tags if you have checked any of the noIndex or noFollow options.
Cheers
Something must not be setup properly at my end.
Using the following
<?php echo $page->seo->robots->render(); ?>
I can get a page to produce this
<meta name="robots" content="noindex, nofollow">
Regardless of what I try, I cannot get SEOMaestro to produce the opposite
<meta name="robots" content="index, follow">
@Wanze UPDATED: After a little more research, I have discovered that index, follow are the default for search engines and don't need to be specified so it appears as if your module is functioning as it should.
In the Admin itself, I have the following set-
Fields > seo > Robots = both unchecked -
Page 01 > seo > Robots > NoIndex = Inherit = unchecked. Prevent... = checked -
Page 01 > seo > Robots > NoFollow = Inherit = unchecked. Prevent... = checked
Result on Page 1 output<meta name="robots" content="noindex, nofollow">
On the other hand, if I do this-
Fields > seo > Robots = both unchecked -
Page 01 > seo > Robots > NoIndex = Inherit = unchecked. -
Page 01 > seo > Robots > NoFollow = Inherit = unchecked.
Output is blank.I'll bypass it for the moment and make a custom field but it'd be good to know what I might be doing incorrectly if you get a chance. -
-
6 hours ago, Juergen said:
Hello @Peter Knight
I think that there is no render tag method for the robot tags, but you can use the following:
$page->seo->robots->data['noIndex'] $page->seo->robots->data['noFollow']
This returns true if 'no index' was choosen and true if 'no follow' was choosen. Create the meta tags by yourself and use PHP to fill in these values into the meta tags.
Best regards Jürgen
Thanks Juergen. I’ll try that. What are the data and square brackets in terms of PHP and the API?
-
You have so many options. But if it’s a simple gallery, you could have all the images within a single images field.
Im not sure what you mean by “catalog the photos” but you could look at image tags.
Alternatively ive created galleries where I needed to create a separate page for each gallery.
-
Hi @Wanze
If we want to output just the opengraph tags, the instructions provided work
`echo $page->seo->opengraph->render();`But what is the syntax to just echo the robots tag ?
`echo $page->seo->robots;`
Outputs 'RobotsSeoData'
`echo $page->seo->robots->render();`
Outputs nothing -
Thanks Dragan. This has bugged me for ages and seems to be finally be the fix
-
Occasionally when I goto Modules > Upgrades I get the following type of error.
There's actually about three of them and each one mentions a different line. In the example below, line 266 is
$new = version_compare($versions[$name]['remote'], $versions[$name]['local']);
( ! ) Notice: Undefined index: local in /Users/peterknight/Sites/mysite.com/site/assets/cache/FileCompiler/site/modules/ProcessWireUpgrade/ProcessWireUpgradeCheck.module on line 266 Call Stack # Time Memory Function Location 1 0.0011 405040 {main}( ) .../index.php:0 2 0.2602 5197688 ProcessWire\ProcessPageView->execute( ) .../index.php:55 3 0.2602 5198064 ProcessWire\ProcessPageView->__call( ) .../index.php:55 4 0.2602 5198064 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 5 0.2603 5198480 ProcessWire\ProcessPageView->_callMethod( ) .../WireHooks.php:733 6 0.2603 5198480 ProcessWire\ProcessPageView->___execute( ) .../Wire.php:383 7 0.3009 5463888 ProcessWire\Page->render( ) .../ProcessPageView.module:209 8 0.3009 5463944 ProcessWire\Page->__call( ) .../ProcessPageView.module:209 9 0.3009 5463944 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 10 0.3015 5465248 ProcessWire\PageRender->renderPage( ) .../WireHooks.php:834 11 0.3015 5465624 ProcessWire\PageRender->__call( ) .../WireHooks.php:834 12 0.3015 5465624 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 13 0.3016 5466040 ProcessWire\PageRender->_callMethod( ) .../WireHooks.php:733 14 0.3016 5466040 ProcessWire\PageRender->___renderPage( ) .../Wire.php:383 15 0.3032 5470760 ProcessWire\TemplateFile->render( ) .../PageRender.module:514 16 0.3032 5470816 ProcessWire\TemplateFile->__call( ) .../PageRender.module:514 17 0.3032 5470816 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 18 0.3033 5471848 ProcessWire\TemplateFile->_callMethod( ) .../WireHooks.php:733 19 0.3033 5471848 ProcessWire\TemplateFile->___render( ) .../Wire.php:380 20 0.3036 5493112 require( '/Users/peterknight/Sites/mysite.com/site/assets/cache/FileCompiler/site/templates/admin.php' ) .../TemplateFile.php:287 21 0.3038 5493616 require( '/Users/peterknight/Sites/mysite.com/wire/modules/AdminTheme/AdminThemeUikit/controller.php' ) .../admin.php:15 22 0.3038 5495120 require( '/Users/peterknight/Sites/mysite.com/wire/core/admin.php' ) .../controller.php:15 23 0.3085 5586144 ProcessWire\ProcessController->execute( ) .../admin.php:135 24 0.3085 5586200 ProcessWire\ProcessController->__call( ) .../admin.php:135 25 0.3085 5586200 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 26 0.3085 5586616 ProcessWire\ProcessController->_callMethod( ) .../WireHooks.php:733 27 0.3085 5586616 ProcessWire\ProcessController->___execute( ) .../Wire.php:380 28 0.3108 5596744 ProcessWireUpgrade->execute( ) .../ProcessController.php:333 29 1.2224 8773000 ProcessWireUpgradeCheck->getVersions( ) .../ProcessWireUpgrade.module:187 30 1.2227 8776256 ProcessWireUpgradeCheck->getModuleVersions( ) .../ProcessWireUpgradeCheck.module:185
I've been living with it for a while and while it doesn't seem to stop me upgrading etc, I'd love to fix it.
Anyone recognise this type of error?
-
Quote
It is also possible to combine strings and placeholders.The following example appends the company name after a page's title:
{title} | acme.com
.What would you suggest if we want to add ' | mysite.com' to the end of every page title but only set it in a single source field.
In the example above, a user would need to add acme.com to every page.
MarkupSEO had a field called Title Format where you could specify the structure of the Meta Title whether it was inherited or custom and it was very useful.
The Sitename placeholder above was essentially an extra field in the config.
Could you consider something like this? I can't seem to add a custom field to the SEO module but would be happy to add one to my custom Settings page (a simple private PW page).
-
-
On 4/14/2019 at 6:06 PM, adrian said:
Actually @Peter Knight - you might try installing that version from scratch - I made several changes to fields and field types, so it might no longer be possible to simply upgrade from the old version.
I tracked down the culprit of the Image field not appearing in the Smart Image option of this module.
When an image field is set to Type=CroppableImages3, it is not recognised as an Images field.
Setting my Images field from CroppableImages3 back to plain old Image worked. Obviously, you then loose your CroppableImages3 function but this was just to prove a theory.
Not sure if this is something for you or @horst but just flagging here in case it's useful to anyone.
BTW, upgrading over the existing install seemed to work fine in general. It might be safer to install from scratch but that completely removes all my existing settings. I tried it on a development environment first. Phew!
-
1 minute ago, adrian said:
No need - that's just an error because PW doesn't like that I have added a .php extension to the module file when there is already a plain .module one installed. Just do a Modules > Refresh and you should be good.
Thanks Adrian.
That looks interesting. So essentially, I have more customised SEO options on a page level. Thanks for the work on this.
I don't have the image field available yet. I might try creating a few other images fields and generally good around and see if I can track down the issue.
-
Should I uninstall the previous one first?
QuoteCompile Error: Cannot declare class MarkupSEO, because the name is already in use (line 12 of /domain.com /site/modules/MarkupSEO/MarkupSEO.module.php)
This error message was shown because: site is in debug mode. ($config->debug = true; => /site/config.php). Error has been logged. -
I'm using MarkupSEO 0.8.7
The Smart Image field which lets me select some image fields doesn't recognise one of an image field.
Not sure if I should be using a different version?
Thanks
-
Feature request, Mike. I know you're busy so just putting it out there.
I am logging 404 hits to a site that get's a ton of spam links. An old SEO spam issue which I am cleaning up.
Anyway, I notice that the jumplinks database table was becoming huge and had bloated to thousands of enties making the database itself very large.
That better house-keeping is my responsibility but wondered if a feature might be useful to optionally auto-delete these over a certain threshold. Or possibly send an email or notification that the logs were becoming quite big etc.
-
I'm really enjoying the Repeater Matrix field lately and always wished it could (optionally) be enhanced with some icons.
A client recently started using Frontify for their brand portal and I thought their implementation was neat.
Video attached. I also really like the categories and filtering.
What do you think @ryan ?
- 2
-
Hi @Pete
Forums are looking much better. I personally find them easier to use with the updated theme.FYI I notice the Developers Map is currently broken.
- 1
-
Hi guys
I have something working and I'm not sure it's the most efficient API usage.
I want to display some content if the page is Vets or any sub page below Vets.
My tree structure looks like this:
Home
Doctors
Vets (ID 1116)
- Vets sub page 01
- Vets sub page 02
- Vets sub page 03
- - Vets sub sub page 01
- - Vets sub sub page 02
- Vets sub page 04
Pilots
GardenersMy working code is:
<?php if ( $page->matches('id=1116') // Page is Vets Overview || // OR $page->parent->matches('id=1116') // Parent Page is Vets Overview ) { echo "My conditional content"; } ?>
Thanks
P -
Hi again @tpr
I notice on the code below I am getting both a data-srcset and a srcset too. Is this correct?
My input
<?php $myimage = $page->Images->first(); ?> <img class="lazyload" data-src="<?php echo $myimage->url ?>" data-srcset="<?php echo $myimage->srcset('800x0, /2, /3') ?>" alt="" />
My output in browser
<img class=" lazyloaded" data-src="/site/assets/files/1/photo-steps-video.jpg" data-srcset=" /site/assets/files/1/photo-steps-video.800x0.jpg 800w, /site/assets/files/1/photo-steps-video.400x0.jpg 400w, /site/assets/files/1/photo-steps-video.266x0.jpg 266w" alt="" srcset="/site/assets/files/1/photo-steps-video.800x0.jpg 800w, /site/assets/files/1/photo-steps-video.400x0.jpg 400w, /site/assets/files/1/photo-steps-video.266x0.jpg 266w" src="/site/assets/files/1/photo-steps-video.jpg" >
-
3 hours ago, kongondo said:
Just a reference, not necessarily that it would work in this case, but related. Tread with caution if you go this route!
Using multi-instance in PW3
Thanks everyone. I might try the route mentioned above.
-
3 minutes ago, cb2004 said:
I wouldn't explore multi-site anymore. You could spit out a feed from site A and read it on site B. You could even import them into site B. I am on mobile right now, but we do this quite regularly so could post an example when I am in the office. RSS, XML, lots of options.
Thanks. That all sounds good.
-
Hi guys
Is it possible to have a PW site display content from another PW site?
I've been reading about ProcessWire's Multi-site options and I don't think either is a way forward for me.
Both PW sites are separate installs with separate databases but crucially they are on the same VPS. So I'm hoping that's a good thing.
Basically, Site A has approx 100 reviews consisting of these fields
- Reviewer name
- Review
- Date
Instead of setting up the fields onto Site B and duplicating work and creating 100 pages, I want to *somehow* get site B to use a selector to fetch the necessary content from Site A.
In future, if I need to update the reviews, I can goto the 'source' Site A to do this.
-
On 3/1/2019 at 7:47 PM, wbmnfktr said:
Everything worked as expected as far as I can tell by now and I should be able to replace my previous set of fields with this module
Are you replacing these manually or with some script?
403 on unpublished
in General Support
Posted
I solved it. This was really odd so I'm glad I found it.
The test page I created and had the 403 error on was called /test/
Renaming it to anything other than /test/ worked
I used the Finder to search for other pages with the same name and there was a page in the trash created by a repeater called /test/
Normally you'd get an alert when naming a page that there was a similar named page and PW would suggest test-1
I wonder if that's worth putting into GitHub as a bug.