Keep on getting error on website using AnchorCMS - php

I’m attempting to use AnchorCMS. I keep on getting this message at the bottom of my page.
Uncaught Exception
Undefined offset: 6
Origin
on line 90
Trace
#0 [internal function]: System\Error::shutdown()
#1 {main}
I’ve already tried deleting and reloading all files.

I also have the same problem as you. I tried to edit in Anchor/config/error.php report => true to report => false, but I’ve got a server error. Then I deleted the value (true or false), left it blank, and it succeed.

Related

I'm try using Spotify PHP api

I'm try to use api from
https://github.com/jwilsson/spotify-web-api-php/blob/main/docs/examples/access-token-with-authorization-code-flow.md.
Unfortunately, it doesn't work well because it gets such an error
Fatal error: Uncaught SpotifyWebAPI\SpotifyWebAPIAuthException: Invalid redirect URI in D:\Software\Development\XAMPP\htdocs\spotif\auth\vendor\jwilsson\spotify-web-api-php\src\Request.php:56 Stack trace: #0 D:\Software\Development\XAMPP\htdocs\spotif\auth\vendor\jwilsson\spotify-web-api-php\src\Request.php(244): SpotifyWebAPI\Request->handleResponseError('{"error":"inval...', 400) #1 D:\Software\Development\XAMPP\htdocs\spotif\auth\vendor\jwilsson\spotify-web-api-php\src\Request.php(112): SpotifyWebAPI\Request->send('POST', 'https://account...', 'client_id=48f0c...', 'HTTP/2 400 \r\nda...') #2 D:\Software\Development\XAMPP\htdocs\spotif\auth\vendor\jwilsson\spotify-web-api-php\src\Session.php(250): SpotifyWebAPI\Request->account('POST', '/api/token', Array, Array) #3 D:\Software\Development\XAMPP\htdocs\spotif\auth\app\check.php(26): SpotifyWebAPI\Session->requestAccessToken('AQA9X84L0SDucXG...', 'a86937efa85589a...') #4 {main} thrown in D:\Software\Development\XAMPP\htdocs\spotif\auth\vendor\jwilsson\spotify-web-api-php\src\Request.php on line 56
I tried to solve the problem with all methods,but even if in the console of my Spotify application.
I have everything set up well, like the redirect URI in my PHP code, I still get an error.
Changing the redirectURI doesn't help me in any way.
Wait some hours/days fixing my problem

WordPress - Fatal error: Uncaught Error: Undefined constant "SBVCGMAP_PLUGIN_VERSION"

I just moved my wordpress site from a server to my localhost to make some changes.
The websites on the server works great. But when i run it on localhost i get this.
Fatal error: Uncaught Error: Undefined constant "SBVCGMAP_PLUGIN_VERSION" in
/opt/lampp/htdocs/cruiceWP/wp-content/plugins/modeltheme-framework/inc/sb-google-
maps-vc-addon/sb-google-maps-vc-addon.php:3 Stack trace: #0
/opt/lampp/htdocs/cruiceWP/wp-content/plugins/modeltheme-framework/modeltheme-
framework.php(65): require_once() #1 /opt/lampp/htdocs/cruiceWP/wp-settings.php(409):
include_once('/opt/lampp/htdo...') #2 /opt/lampp/htdocs/cruiceWP/wp-config.php(90):
require_once('/opt/lampp/htdo...') #3 /opt/lampp/htdocs/cruiceWP/wp-load.php(50):
require_once('/opt/lampp/htdo...') #4 /opt/lampp/htdocs/cruiceWP/wp-blog-
header.php(13): require_once('/opt/lampp/htdo...') #5
/opt/lampp/htdocs/cruiceWP/index.php(17): require('/opt/lampp/htdo...') #6 {main}
thrown in /opt/lampp/htdocs/cruiceWP/wp-content/plugins/modeltheme-framework/inc/sb-
google-maps-vc-addon/sb-google-maps-vc-addon.php on line 3
Notice: is_embed was called incorrectly. The conditional functions do not work before the
query is executed. Before the basic application they give false. Please see the Debugging
in WordPress page for more information. (This message was added in version 3.1.0.) In
/opt/lampp/htdocs/cruiceWP/wp-includes/functions.php on line 5535
Notice: is_search was called incorrectly. The conditional functions do not work before
the query is executed. Before the basic application they give false. Please see the
Debugging in WordPress page for more information. (This message was added in version
3.1.0.) In /opt/lampp/htdocs/cruiceWP/wp-includes/functions.php on line 5535
This is the file that has the problem as the error message says.
sb-google-maps-vc-addon.php
<?php
#define(SBVCGMAP_PLUGIN_VERSION,'1.4'); //Plugin Version
#define(SBVCGMAP_PLUGIN_NAME, 'MT Google Maps'); //Plugin Name
#define(SBVCGMAP_PLUGIN_DIR, trim(plugin_dir_url(__FILE__), '/')); //Plugin Dir
#define(SBVCGMAP_PLUGIN_PATH, trim(plugin_dir_path(__FILE__), '/')); //Plugin Path
//Including all common functions
include('inc/functions.php');
//Including admin panel
include('admin/admin-panel.php');
//Including shortcodes
include('shortcodes.php');
Im stuck for days in this. Does anyone have any idea?
PHP constant names need to be defined as strings. Prior to PHP 8, if you passed an unquoted string, PHP would raise a warning but still treat it as a string which is why that developer included the silencing # operator.
The fix is to quote the names, and I’d remove the #, too
define('SBVCGMAP_PLUGIN_VERSION','1.4');

Cloudinary AI background removal fatal error

I am trying to use Cloudinary AI background removal tool. This is the code I am using (Code snippet provided by Cloudinary)
if(isset($_POST["submit"])){
\Cloudinary\Uploader::upload("https://www.popwebdesign.net/popart_blog/wp-content/uploads/2019/05/slike-prirode-za-desktop-757.jpg",
array(
"public_id" => "dog_couch",
"background_removal" => "cloudinary_ai"
));
}
I get this error
Fatal error: Uncaught Error: Class 'Cloudinary\Error' not found in /storage/ssd5/884/7393884/public_html/Uploader.php:534 Stack trace: #0 /storage/ssd5/884/7393884/public_html/Uploader.php(408): Cloudinary\Uploader::call_api('upload', Array, Array, 'https://www.pop...') #1 /storage/ssd5/884/7393884/public_html/Uploader.php(101): Cloudinary\Uploader::call_cacheable_api('upload', Array, Array, 'https://www.pop...') #2 /storage/ssd5/884/7393884/public_html/index.php(13): Cloudinary\Uploader::upload('https://www.pop...', Array) #3 {main} thrown in /storage/ssd5/884/7393884/public_html/Uploader.php on line 534
When I use part just for uploading it works perfectly
if(isset($_POST["submit"])){
\Cloudinary\Uploader::upload("https://www.popwebdesign.net/popart_blog/wp-content/uploads/2019/05/slike-prirode-za-desktop-757.jpg");
}
as soon as I add array part I get the error. I can't see what I am doing wrong since this code is directly from cloudinary. I've found it here: https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon
I have tried to search the internet, but could not find a solution for this.
Any help is appreciated!

Gutenberg returns error 500 on save on certain pages

I have website which has Gutenberg and it is very important part of it, problem is..
When i enter page and try to save it i get error 500, in console i have this error in console
POST https://myDomain/wp-json/wp/v2/pages/5950 500 ()
POST https://myDomain/wp-admin/post.php?post=5950&action=edit&classic-editor=1&meta_box=1 500 ()
and this error in my error log
[12-Sep-2018 09:46:18 UTC] PHP Fatal error: Uncaught Exception: Invalid page template. in /usr/www/users/foodno/v32/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-duplication.class.php:99
Stack trace:
#0 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(4219): WPML_Post_Duplication->make_duplicate(5950, 'he')
#1 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-synchronization.class.php(84): SitePress->make_duplicate(5950, 'he')
#2 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(248): WPML_Post_Synchronization->sync_with_duplicates(5950)
#3 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-admin-post-actions.class.php(113): WPML_Post_Translation->after_save_post('535', Array, 'en', NULL)
#4 /usr/www/users/myDomain/wp-includes/class-wp-hook.php(288): WPML_Admin_Post_Actions->save_post_actions('5950', Objec in /usr/www/users/foodno/v32/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-duplication.class.php on line 99
I am also using WPML plugin, and on save plugin gets stuck screenshot
Loader is in loop...
Thing is, it saves the edited content, but still it returns error 500, i tried debugging and got absolutely nothing
I have googled it of course before asking and i found these as known Gutenberg issues that occured before... None of these did not help.. Does anyone have any suggestion or solution?
https://github.com/WordPress/gutenberg/issues/5675
https://github.com/WordPress/gutenberg/issues/8410
Thanks in advance
I asked on their git also, and i've got an answer from mr with nickname "brucepearson" and WPML will apparently fix this in next update, here is link to git q/a
https://github.com/WordPress/gutenberg/issues/9816

Magento white page at front and backend

After customizing some files last week, both the back end and front end of the site I’m developing for went blank. I have already searched the internet and tried out some possible solutions, but none of them works.
Somehow I can’t manage to show any error message. I already uncommented ini_set(’display_errors’, 1);, changed error_reporting(E_ALL | E_STRICT); into error_reporting(E_ALL); and I tried even more possible solutions.
I also edited the memory to 128M, changed some settings in php.ini, changed local.xml.sample to local.xml. Nothing seems to work.
I seriously have no idea how I can solve this, so that’s why I’m here. I hope someone can help me. If you need more information, please ask, I don’t really know what’s necessary to answer my question.
After adding the following lines to index.php I managed to get error messages:
error_reporting(E_ALL);
ini_set(’display_errors’, 1);
ini_set(‘memory_limit’, ’256M’);
The error I get is:
Cannot send headers; headers already sent in /home/cheapas/public_html/index.php, line 39
Trace:
#0 /home/cheapas/public_html/lib/Zend/Controller/Response/Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /home/cheapas/public_html/app/code/core/Mage/Core/Model/App.php(1246): Zend_Controller_Response_Abstract->setHeader(’Content-Type’, ‘text/html; char...’)
#2 /home/cheapas/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(80): Mage_Core_Model_App->getResponse()
#3 /home/cheapas/public_html/app/code/core/Mage/Core/Model/Url/Rewrite.php(204): Mage_Core_Controller_Varien_Front->getResponse()
#4 /home/cheapas/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(166): Mage_Core_Model_Url_Rewrite->rewrite()
#5 /home/cheapas/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#6 /home/cheapas/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home/cheapas/public_html/index.php(91): Mage::run(’’, ‘store’)
#8 {main}
Guess what, line 39 is: ini_set(‘memory_limit’, ’256M’);
When I delete this line I get a blank page again, so that doesn’t solve anything. Does anyone have an idea on solving this? Thanks!
As you may have understood, I actually can get error messages to show when I force an error by adding an unknown or uncomplete line to my index.php. Somehow there is a problem which doesn’t want to show up.

Categories