Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs typos #797

Open
adrianbj opened this issue Jan 21, 2019 · 34 comments
Open

Docs typos #797

adrianbj opened this issue Jan 21, 2019 · 34 comments

Comments

@adrianbj
Copy link

@adrianbj adrianbj commented Jan 21, 2019

Hopefully we can all make use of this issue to add typos as we find them rather than creating new issues for each one.

  1. https://processwire.com/api/ref/fieldgroup/has-field/
    Does this fieldgroup haveing the given field?

  2. https://processwire.com/api/ref/config/version/
    Check if current ProcessWire version is equal to or newer than given versinon

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Jan 21, 2019

Not a typo exactly but the Template::hasField() method has no arguments description: https://processwire.com/api/ref/template/has-field/

@ryancramerdesign
Copy link
Member

@ryancramerdesign ryancramerdesign commented Feb 4, 2019

Thanks I have pushed the suggested fixes.

@matjazpotocnik
Copy link

@matjazpotocnik matjazpotocnik commented Feb 5, 2019

Pageimage.php, line 50: file -> File
Pageimage.php, line 1656: please add @SInCE 3.0.126 for render() method
Pageimages.php, line 225: please add @SInCE 3.0.126 for render() method
Pageimage.php, line 1657: and or -> and/or
Sanitizer.php, line 24: intances -> instances
Sanitizer.php, line 75: example -> example,
Sanitizer.php, line 86: ta -> a

ryancramerdesign added a commit to processwire/processwire that referenced this issue Feb 14, 2019
@gmclelland
Copy link

@gmclelland gmclelland commented Feb 15, 2019

In ProcessPageList.module(/wire/modules/Process/ProcessPageList/ProcessPageList.module): hierarchal should be hierarchical

  • line: 6
  • line: 41

@gmclelland
Copy link

@gmclelland gmclelland commented Feb 20, 2019

In ProcessPageList.module(/wire/modules/Process/ProcessPageList/ProcessPageList.module):
classs should be class
line: 327

@jlahijani
Copy link

@jlahijani jlahijani commented Feb 23, 2019

ryancramerdesign added a commit to processwire/processwire that referenced this issue Feb 28, 2019
@jlahijani
Copy link

@jlahijani jlahijani commented Mar 6, 2019

double negative on this page:
https://processwire.com/api/ref/sanitizer/

Sanitize input string as multi-line text without no HTML tags

@szabeszg
Copy link

@szabeszg szabeszg commented Mar 6, 2019

Typo in $database API example:
https://processwire.com/api/ref/wire-database-backup/

The very first example, instead of
$database->backup();
looks like should be:
$database->backups();

Source: https://processwire.com/talk/topic/20967-not-sure-where-to-report-code-sample-typos-in-the-api-docs/

@ryancramerdesign
Copy link
Member

@ryancramerdesign ryancramerdesign commented Mar 8, 2019

@szabeszg @jlahijani Thanks, fixed.

@matjazpotocnik
Copy link

@matjazpotocnik matjazpotocnik commented Mar 13, 2019

module.php: "You may implement also implement this method as hookable, ..." double implement

ryancramerdesign added a commit to processwire/processwire that referenced this issue Mar 19, 2019
@jlahijani
Copy link

@jlahijani jlahijani commented Mar 21, 2019

wire\modules\AdminTheme\AdminThemeUikit\config.php

"Chose option B if you are having any trouble achieving intended Inputfield column widths."

Change Chose to Choose.

@jlahijani
Copy link

@jlahijani jlahijani commented Mar 23, 2019

wire\core\WireArray.php

"Property or properties to retrieve, or callable function that shuld receive items."

shuld -> should

@gadgetto
Copy link

@gadgetto gadgetto commented Apr 1, 2019

wire/core/Wire.php

Line 1618: $this->wire('widgets', $widgets');

should be: $this->wire('widgets', $widgets);

@matjazpotocnik
Copy link

@matjazpotocnik matjazpotocnik commented Apr 1, 2019

A double semicolon in line 289 in ProcessPageAdd.module: $parentTemplates = new TemplatesArray();;

In case you didn't see: typo in Pageimage.php line 1558 processwire/processwire@a434b1b

ryancramerdesign added a commit to processwire/processwire that referenced this issue Apr 2, 2019
@matjazpotocnik
Copy link

@matjazpotocnik matjazpotocnik commented Apr 2, 2019

WireArray.php "Flags for PHP sort functdions" -> functions

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Apr 4, 2019

ProcessModule.module here and here

"This URL may be be accessed directly" should be "This URL may not be accessed directly".

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Apr 4, 2019

Not a typo, but there appears to be no links to this important documentation page: https://processwire.com/api/ref/paths/
The URL structure implies that it should be linked to from https://processwire.com/api/ref/
Are there other similar pages under https://processwire.com/api/ref/ that are not linked to from the parent page but should be?

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Apr 7, 2019

Another unlinked section of the API docs: https://processwire.com/api/ref/pages-names/

ryancramerdesign added a commit to processwire/processwire that referenced this issue Apr 9, 2019
@ryancramerdesign
Copy link
Member

@ryancramerdesign ryancramerdesign commented Apr 9, 2019

@Toutouwai These are dynamically generated doc pages from the ProcessWireAPI module that go out and look for the class and then generate a doc page for it on the fly. The list you see a /api/ref/ is just a small curated list that I've picked out as being the most useful/important parts of the public API, which is probably only about 1/10th of the total number of classes you could generate documentation for from this endpoint/module. Other classes are linked where relevant as argument or return values. If you think the ones you mentioned need more exposure, I can always include them in the curated list index, but I also want to be careful about having too much info up front.

@matjazpotocnik
Copy link

@matjazpotocnik matjazpotocnik commented Apr 9, 2019

I personally would add https://processwire.com/api/ref/paths/ since it's common to use in templates, even (or especially) for beginners. https://processwire.com/api/ref/pages-names/ is from my point of view more developer oriented.

@ryancramerdesign
Copy link
Member

@ryancramerdesign ryancramerdesign commented Apr 9, 2019

@matjazpotocnik @Toutouwai I think you guys are right about Paths — I've added the Paths class to the main index (and also as $urls API var). for PagesNames, I've not added it to the main index but it does seem like it's got potential usefulness in the public API (even if occasional), so have made the $pages->names() method part of the public API so that the class can be navigated to (as the return value for that method) or it can be found from the search.

@adrianbj
Copy link
Author

@adrianbj adrianbj commented Apr 9, 2019

Again, not really a typo, but I think that $mail needs references to all the methods that are available to WireMail. If you look at the docs to $mail you don't see anything like toName(), fromName(), etc.

I think newbies won't know to also check the WireMail() docs. I think it's also really important to explain why $m = new WireMail(); is a bad idea unless you know what you are doing - ie it breaks modules that extend WireMail.

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Apr 9, 2019

The list you see a /api/ref/ is just a small curated list that I've picked out as being the most useful/important parts of the public API, which is probably only about 1/10th of the total number of classes you could generate documentation for from this endpoint/module.

Personally I'm in favour of listing all documentation pages that exist. To avoid clutter and give the most important pages priority the other currently unlisted pages could be contained in a collapsed Other/Advanced/Kitchen Sink section (whatever naming you think best).

Besides the fact that I myself would refer to these pages I think it adds credibility to the PW project to have full and comprehensive documentation on display.

@matjazpotocnik
Copy link

@matjazpotocnik matjazpotocnik commented Oct 19, 2019

In PageimageVariations.php in count(): @param array $options See options for find() emthod

@matjazpotocnik
Copy link

@matjazpotocnik matjazpotocnik commented Oct 29, 2019

In Inputfield.php, line 1280, ragument -> argument

@matjazpotocnik
Copy link

@matjazpotocnik matjazpotocnik commented Nov 8, 2019

In wire/core/Exceptions.php, line 43, one "there is" too many

ryancramerdesign added a commit to processwire/processwire that referenced this issue Dec 3, 2019
@chriswthomson
Copy link

@chriswthomson chriswthomson commented Dec 6, 2019

In WireInput.php, line 322, sanitizedd

@chriswthomson
Copy link

@chriswthomson chriswthomson commented Dec 18, 2019

In PageArray.php, line 78, Template mehod

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Dec 19, 2019

In Module.php, I think "called" should be "cannot":

If the install() method determines that the module called be installed for some reason, it should throw a `WireException.`

@jlahijani
Copy link

@jlahijani jlahijani commented Aug 9, 2020

In ProCache 4: "When in cahce debug mode" (the word 'cache' is misspelled).

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Sep 25, 2020

Please add Notice::noGroup flag to documentation for Wire::message(), Wire::warning() and Wire::error() to reflect these commits:
processwire/processwire@8d82308
processwire/processwire@8c5d3af

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Sep 27, 2020

$pages->find() documentation should replace reference to getById() with getByIDs().

loadOptions (array): Optional associative array of options to pass to getById() load options.

@teppokoivula
Copy link

@teppokoivula teppokoivula commented Sep 28, 2020

$database->escapeStr():

Escape a string value, same as $db->quote() but without surrounding quotes

This probably should refer to $database instead of $db?

@chriswthomson
Copy link

@chriswthomson chriswthomson commented Nov 18, 2020

Not a typo exactly, but line 1632 of Sanitizer.php

* - separator (string): Character(s) to separate HTML <li> items with (default="\n").

<li> should back tick quoted to stop 'items...' from becoming a new list item on https://processwire.com/api/ref/sanitizer/markup-to-text/

EDIT: haha the markdown here got me caught with the same issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants