autotutorial
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Can’t connect to WordPress REST API without a pluginSites with the full API available (i.e. with WordPress 4.7+ or the WordPress rest api version 2 installed) will have the wp/v2 item in namespaces as well.
WordPress 4.4 enabled the API infrastructure for all sites, but did not include the core endpoints under wp/v2. without WordPress rest api version 2https://developer.wordpress.org/rest-api/using-the-rest-api/discovery/
Missing 4.7 here (for /wp/v2/ endpoint, root endpoint is /wp-json) https://developer.wordpress.org/rest-api/extending-the-rest-api/routes-and-endpoints/
Changelog https://developer.wordpress.org/rest-api/changelog/
Guide https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/ ( nonce automatically managed, for WordPress 4.7 or WordPress api rest version 2 plugin ).
JavaScript core https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/js/wp-api.js#L840
For developers using the built-in Javascript API, this is handled automatically for you. This is the recommended way to use the API for plugins and themes. Custom data models can extend wp.api.models.Base to ensure this is sent correctly for any custom requests.I could not locate wp.api.models.Base , but the core file is this.
theoretically javascript must send a header and the is automatically managed.Good Coding.
Forum: Developing with WordPress
In reply to: Can’t connect to WordPress REST API without a pluginhttps://developer.wordpress.org/rest-api/reference/posts/#arguments default status publish and default context view. endpoint /wp/v2/posts
can you make the type of error you get readable? (obscuring sensitive data if necessary)
Forum: Developing with WordPress
In reply to: Can’t connect to WordPress REST API without a pluginContext view GET, request wp/v2/posts?status=publish Does it work as a browser? view requests (GET) do not need authentication for this scenery.
Forum: Fixing WordPress
In reply to: Error while trying to upload a picture.you have to talk to your hosting, the php engine is not enabled for that path (maybe the change of domain or maybe the folder or maybe your wrong permissions).
I see with browser plain text file.Forum: Fixing WordPress
In reply to: Theme 403 Forbiddenhttps://wordpress.org/support/topic/theme-403-forbidden/#post-12292401
The DirectoryIndex is the default page served by the server when a user requests an index of a directory by specifying a forward slash (/) at the end of the directory name.
For example, when a user requests the page http://www.example.com/this_directory/, he or she will get either the DirectoryIndex page if it exists, a server-generated directory list if it does not and the Indexes option is specified, or a Permission Denied page if neither is true. The server will try to find one of the files listed in the DirectoryIndex directive and will return the first one it finds. If it does not find any of these files and if Options Indexes is set for that directory, the server will generate and return a list, in HTML format, of the subdirectories and files in the directory. The default value, found in /etc/apache2/mods-available/dir.conf is “index.html index.cgi index.pl index.php index.xhtml index.htm”. Thus, if Apache2 finds a file in a requested directory matching any of these names, the first will be displayed.
https://httpd.apache.org/docs/2.4/sections.html#file-and-web
server config (httpd.conf, htaccess), virtual host https://httpd.apache.org/docs/2.4/mod/core.html#directoryForum: Fixing WordPress
In reply to: Theme 403 ForbiddenDirectoryindex means when you connect remotely to a folder he moves you to the file you have set.
Search with browser, directoryindex https://help.ubuntu.com/lts/serverguide/httpd.html (for ubuntu and apache 2)Forum: Fixing WordPress
In reply to: Home page 404 error index.htmluse the private mode of chrome or a browser that has never had access to your website.
Forum: Fixing WordPress
In reply to: Theme 403 Forbiddentechnically it must make requests to a file, is index.php of the theme twentytwenty visible in your browser?
your guide indicates read and write permissions.
Read only-rw-r–r– 1 wp-user wp-user 177 Nov 18 15:21 index.php
You have Read and Write -rw-rw-r–
Only example , not edit any configuration https://www.a2hosting.com/kb/developer-corner/apache-web-server/directory-index-listingsyou just have to enable directoryindex
Forum: Fixing WordPress
In reply to: Cannot enable XML-RPC; mentioned configuration options are not thereXML-RPC functionality is turned on by default since WordPress 3.5.
https://codex.wordpress.org/XML-RPC_Support
some hosting with custom WordPress may use the enable in a different way with the menu or htaccess configurations etc.
even reverse proxies or proxies may block requests to XML-RPC file.A path wp-content/upluoads or media/2020 is a valid path, probably WordPress with a php regex recovers the year and overwrites it …. in this scenario it is a bug not a bad use for the constant.
for completeness here are the predefined paths.Uploads Multisite or Normal WordPressForum: Fixing WordPress
In reply to: Parse error when switched to PHP 7.3Yes @sterndata is $args = array(); reference https://developer.wordpress.org/reference/classes/walker_category/
From the WordPress repository the latest version of the mystique theme is version 2.5.7 from the manufacturer site 3.3.2 without updates for 8 years. http://digitalnature.eu/themes/mystique/Forum: Fixing WordPress
In reply to: Removing Front Page From Permalink@padione you don’t have to change your url where wordpress resides but you have to limit yourself to using a static page.
example constant ABSPATH local path installation folder wordpress /home/user/public_html/ must not be changed to /home/user/public_html/path otherwise for wordpress the url of the site is the setting of the dashboard (overwriting one path to another) Site Address (URL) WP_HOME.
Start installaction WordPress https://vanside.de/ (for browser)define( 'WP_HOME', 'https://vanside.de' );
Without end slash for WordPress.- This reply was modified 6 years, 4 months ago by autotutorial.
As of WordPress 5.3 you don’t use the old date and time functions depending on an offset, now use the DATETIME class or functions available from WordPress 5.3.
$container = new DateTime( "Y", new DateTimeZone( "UTC" ) ); $value = $container->format( "Y" ); //or DashBoard settings get_option( 'timezone_string' ) or get_option( 'gmt_offset' ) //Conversion object DateTimeZone https://developer.wordpress.org/reference/functions/wp_timezone/ refer to https://developer.wordpress.org/reference/functions/wp_timezone_string/ // php 5.5.0 for offset +01:00also from wordpress 5.3 it requires exactly YYYY-MM-DD.
The predefined folders for uploading are created automatically by wordpress, it means not applying any code.if to overwrite the uploads folder you create the code with the DateTime class without Multisite Global Media plugin and you have problems, you can open a ticket bug on https://core.trac.wordrpress.org
- This reply was modified 6 years, 4 months ago by autotutorial.
Forum: Fixing WordPress
In reply to: Missing URL sectionhave you looked at my suggestion? can you show a screenshot of site settings?
Forum: Fixing WordPress
In reply to: Missing URL sectionWhen you enable multisite and create your network, you cannot set WP_SITEURL or WP_HOME from the Dasboard.
From sites click on edit go to settings and look at the two urls