Repository navigation
docs(building-sites/extras): fact-check pass, en/ru sync - #678
Ibochkarev wants to merge 3 commits into
Conversation
| A provider is a base URL of a REST service. MODX appends a fixed route to it and reads the answer as XML: | ||
|
|
||
| MODX recommends not downloading Transport Packages from providers you cannot verify or do not trust. We recommend the modx.com Official Provider at: [https://rest.modx.com/extras/](https://rest.modx.com/extras/) | ||
| | Route | What it returns | |
There was a problem hiding this comment.
Do we need the routes in the docs? Kinda technical, but also incomplete for anything looking to build their own (which would require tons more detail).
There was a problem hiding this comment.
Removed the route list. A provider is the address packages are downloaded from. For modx.com that address is https://rest.modx.com/extras/, and it goes in Service URL.
| | `description` | free text | | ||
|
|
||
| Once you have a provider, you can connect to it by going up to the Packages grid, clicking "Add New Provider", and then select the "Select a Provider" option. This will bring up a dropdown of Provider options:  | ||
| MODX checks the provider when it is saved: it asks the service `verify` and expects an answer that confirms the provider. A provider that does not answer is not saved. |
There was a problem hiding this comment.
too technical, just say that it is verified on creation
There was a problem hiding this comment.
The page now says MODX checks the provider when you save. If the service does not confirm the address, the record is not saved.
| MODX checks the provider when it is saved: it asks the service `verify` and expects an answer that confirms the provider. A provider that does not answer is not saved. | ||
|
|
||
| Once you've selected your provider, click Next, and the download tree will be populated with the contents of that Provider's payload (ie, data). This will show you a tree of Package Versions you can download: | ||
| Every request to the provider carries: |
There was a problem hiding this comment.
too technical. it may be worth adding a section that explains what information is shared with providers though.
There was a problem hiding this comment.
Added a short list of what each request sends: the Username and API Key from the window, an installation identifier, the database type, the MODX version, the host, the PHP version, and the manager language. The page uses those window labels.
| ## cURL Is Missing | ||
|
|
||
| Most issues can be resolved by making sure you have cURL installed, and that the core/packages/ directory is writable by PHP. | ||
| MODX asks the providers over HTTP with the PSR-18 client, which needs the extension cURL. The manager checks it when the page opens. Without cURL a notice is shown above the page, and the button **Download Extras** is replaced by the search of the local directory. |
There was a problem hiding this comment.
too technical, what user cares about it being PSR-18
these "fact-check" PRs are very obviously translating code to docs but aren't asking what users care about. it's not a route or PSR standard, it's the functionality in most cases.
There was a problem hiding this comment.
The PSR-18 name is gone. Without the cURL extension, a warning appears above the page and Download Extras is replaced by Search Locally for Packages.
| Some servers have a broken build of ZipArchive, and the unpack fails with an error from `extractTo` or `archiveTo`. The message comes from PHP, not from MODX. | ||
|
|
||
| ### Access Denied Error | ||
| Set the system setting `archive_with` to **Yes** (the value `1`). MODX then unpacks the archives with PCLZip, which is shipped with MODX and needs no extension of PHP. |
There was a problem hiding this comment.
too technical again imo. good to explain archive_with but what does a pclzip mean to a typical user?
There was a problem hiding this comment.
The library and PHP function names are gone. If an archive does not unpack, set archive_with to Yes. MODX unpacks the archive without the PHP Zip extension.
| | **Uninstall** | the package is installed; the button rolls its elements back | | ||
| | **Reinstall** | the package is installed; the button runs the installation again over it | | ||
| | **Update** | the setting `auto_check_pkg_updates` is on and the provider has a newer version | | ||
| | **Check For Updates** | the package came from a provider and the setting `auto_check_pkg_updates` is off, so MODX does not know of a newer version yet | |
There was a problem hiding this comment.
this is wrong, it is also shown when it hasn't previously found an update and lets the user do a manual check
There was a problem hiding this comment.
The row shows Check For Updates for any package from a provider when Update is not on that row. That covers a package where no newer version has been found yet, so you can run the check yourself. Update appears when the list loads, auto_check_pkg_updates is on, and the provider has a newer version. If the check returns no versions, the window stays closed and the manager says the package is already up to date.
|
|
||
| A package that came from a provider can be checked for a newer version: the **Check For Updates** button of the row opens a window with the versions the provider offers, and a newer version is installed from there. | ||
|
|
||
| With the setting `auto_check_pkg_updates` turned on, MODX asks the provider for the newest version itself. The button of the row is then **Update** when a newer version is there, and **Check For Updates** otherwise. |
There was a problem hiding this comment.
With the setting
auto_check_pkg_updatesturned on, MODX asks the provider for updates when loading the list automatically.
There was a problem hiding this comment.
Rewrote that sentence. When the list loads and auto_check_pkg_updates is on, MODX asks the provider for a newer version. The row shows Update when one exists. Otherwise a package from a provider shows Check For Updates.
| The **Remove** button of the row deletes the package from the installation. The window **Delete Package** asks whether the package has to be uninstalled first — the option **Force Package Removal** deletes it either way. | ||
|
|
||
| ## Step-by-step | ||
| The removal drops the archive `core/packages/<signature>.transport.zip`, the unpacked directory `core/packages/<signature>/` and the record of the database. The elements of the package are left where they are. |
There was a problem hiding this comment.
can't say I've tried this recently, but surely the Remove option uninstalls the package (removing its elements) before removing the records?
There was a problem hiding this comment.
Remove uninstalls the package first, so the elements are removed. It then deletes the archive, the unpacked directory, and the package record. Force Package Removal deletes the record even when the uninstall failed.
| The requirements are listed on the tab **Dependencies** of the pre-install panel, and the button **Install all dependencies to continue** installs them. | ||
|
|
||
| The Official Provider of modx.com has a URL of: <http://rest.modx.com/extras/> and comes packaged in with MODX Revolution 2.0.0. | ||
| With the setting `abort_install_on_unsatisfied_dependency` — on by default — the installation is stopped until the dependencies are satisfied. |
There was a problem hiding this comment.
too technical, this is a detail for package devs I think
There was a problem hiding this comment.
Removed that setting from this page. During install, the Dependencies tab keeps the continue buttons inactive until the missing packages are installed from the rows. Their label is Install all dependencies to continue. How a package declares dependencies stays on the transport packages page.
| The option `default_provider` names the provider that is preselected. The page reads it, but it is not registered as a system setting — see [modxcms/revolution#17100](https://github.com/modxcms/revolution/issues/17100). | ||
|
|
||
| ### Uninstalling Packages | ||
| ## Processors |
There was a problem hiding this comment.
what's the use for this type of reference for the typical user?
There was a problem hiding this comment.
Removed the processor list from the package management page.
… the RU locale Three markers of the editorial pass are resolved against the code: - the actions of a row. **Uninstall** rolls the elements of an installed package back, **Reinstall** runs the installation again over it — both call the same handlers, but they do different things. **Update** shows when the setting `auto_check_pkg_updates` is on and the provider has a newer version; **Check For Updates** shows when the package came from a provider and the setting is off, so MODX does not know of a newer version yet (`Processors/Workspace/Packages/GetList.php`, the method `checkForUpdates()`); - `OnPackageInstall` carries the `package` and the `action`: `install` for the first installation, `upgrade` when a newer version is installed over an older one (`Processors/Workspace/Packages/Install.php`). The setting `abort_install_on_unsatisfied_dependency` is added to the table of the settings. The Russian pages follow the English ones: the same headings, the same tables and the same wording. The link to the section of the dependencies carried the anchor `#зависимости`, which the site cannot resolve — it transliterates the Cyrillic — so it is `#zavisimosti` now.
9115b97 to
97683d5
Compare
The review on modxorg#678 asked for the buttons and checks on the package manager, without routes, processor tables, or library names.
Fact-check pass of the section
building-sites/extrasagainst the code of the MODX 3.x branch (a7096dbe1).The section was written for MODX 2: half of the interface it names does not exist any more. 39 discrepancies were found — 7 PHANTOM, 11 STALE, 3 ORPHAN, 15 UNDOCUMENTED, 3 UNVERIFIABLE. All of them are closed.
Fixed
preexisting_mode= 2), or delete the version in the card of the package.disableContextMenuAction: true). The actions are the buttons of the row: Install, Uninstall, Reinstall, Update, Check For Updates, Remove, View Details.simplexml_load_string, the request carriesAccept: application/xml, and the provider is checked on save withGET <service_url>/verify.https://rest.modx.com/extras/, and it ships with MODX 3.x — not with 2.0.0.core/packages/<signature>/and the archive. Uninstall rolls the elements back and leaves the archive, the directory and the record in place.Added
The full reference: the actions of a row and when they show, the card of a package with its uploaded versions, the dependencies and the setting
abort_install_on_unsatisfied_dependency, the upload of an archive, Purge Old Packages, the permissions (workspaces,packages,providers,file_upload), the eventsOnPackageInstall/OnPackageUninstall/OnPackageRemove, the settings and the table of the processors.Screenshots
Five screenshots of the MODX 2 panel are gone from the repository — they showed the grid of the providers, the wizard of the provider, the wizard of the download, the setup options and the uninstall. The frames that replace them are named in
.temp/docs-review/media-todo.md; they need a test stand of MODX 3. The four screenshots of the Package Management page that are of MODX 3 stay, and two of them are now in the text.Defects of the core
Reported in modxcms/revolution:
modTransportManager::getProviders()filters on a columndisabledthat the tabletransport_providersdoes not have (the flag isactive), so the query fails withUnknown column 'disabled'.modTransportManager::scanForUpdates()andscanForPackages()callscanForUpdates()andscanForPackages()on the provider, andmodTransportProviderhas no such methods.default_provideris read by the page of Package Management, but it is not registered as a system setting, so it cannot be set in the manager.Locales
The Russian pages follow the English ones: the same headings, the same tables with the same number of rows, the same wording. The link to the section of the dependencies carried the anchor
#зависимости, which the site cannot resolve — it transliterates the Cyrillic — so it is#zavisimostinow.Checks
markdownlint-cli@0.18(the version used by CI): 0 issuesFACT?,EXAMPLE?orMEDIAare left in the files