#1 Re: Bug Reports » Sitemap throws error » January 28, 2019 4:56am

 <?xml version="1.0" encoding="UTF-8" ?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"><url><loc>https://froets.nl//</loc></url>
<url><loc>https://froets.nl/producten/</loc></url>
<url><loc>https://froets.nl/productcategorieen/</loc></url>
<url><loc>https://froets.nl/zoek-op-categorie/</loc></url>
<url><loc>https://froets.nl/cronjob/</loc></url>
<url><loc>https://froets.nl/producten/drinkwaren/flessen/</loc></url>

#3 Bug Reports » Sitemap throws error » January 27, 2019 5:05pm

daansk44
Replies: 4

We are running a website with +- thirty thousand pages on BigtreeCMS that almost works flawlessly. The only problem we are facing right now is that the sitemap.xml isn't made correctly.

We are getting the next error

This page contains the following errors:
error on line 1 at column 7: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.

version 4.3.2

#4 Re: Developer Help » Adding the route to page » January 14, 2019 12:15pm

Is it possible to add slashes to the route? without using a parent (or routed template)

`productcat/cars/model/ford`

#5 Developer Help » Adding the route to page » January 14, 2019 9:20am

daansk44
Replies: 3

Is it possible to add a custom route using the createPage command?

 $this->newpage->createPage([
                    "parent" => 1,
                    "nav_title" => $xmlitem->ItemDesc . " | " . $xmlitem->SimpleColor,
                    "in_nav" => "on",
                    "template" => "Products",
                    "new_window" => "new",
                    "entry" => "new",
                    "max_age" => 0,
                    "route" => 'articleblablabla',

#6 Re: Developer Help » Search based on resources in page » December 30, 2018 2:59pm

We have tried this

 $cat = $_GET['cat'];
        $brand = $_GET['Brand'];
        $product = $_GET['product'];
        
        $pages = SQL::fetchAll("SELECT * FROM `bigtree_pages` WHERE `resources` like \'%\"XNCatDesc\": \"%?%\' and `resources` like \'%\"Brand\": \"%?%\' and `resources` like \'%\"ItemDesc\": \"%?%\'", $cat, $brand, $product);
        var_dump( $pages); 

but still throws an error

Fatal error: SQL::fetchAll called on invalid query resource. The most likely cause is an invalid query call. Last error returned was: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '\'%"XNCatDesc": "%'41'%\' and `resources` like \'%"Brand": "%'none'%\' and `reso' at line 1 in C:\xampp\htdocs\projecten\froets\Source\core\inc\bigtree\sql-class.php on line 959

#7 Re: Developer Help » Search based on resources in page » December 30, 2018 6:48am

Hey Tim,

Thanks for the response.

What if we want to search using $_GET variable (and escape it in the fist place)
When we do this

        $parameter1 = $_GET['cat'];
        $parameter2 = $_GET['Brand'];
        $paramenters = array ($parameter1, $parameter2);
        $pages = SQL::fetchAll("SELECT * FROM `bigtree_pages` WHERE `resources` LIKE '%XNCatDesc\": \"%?%\"%' and `resources` LIKE '%Brand\": \"%?%\"%'", $paramenters);
        return $pages;

It will throw an error

Fatal error: Uncaught Exception: SQL::query error - wildcard and argument count do not match (2 '?' found, 1 arguments provided) in C:\xampp\htdocs\projecten\froets\Source\core\inc\bigtree\sql-class.php:1396 Stack trace: #0 C:\xampp\htdocs\projecten\froets\Source\core\inc\bigtree\sql-class.php(974): SQL::query('SELECT * FROM `...', Array)

#8 Re: Developer Help » Add pages using API » December 29, 2018 1:28pm

Thank you Tim,

The first two we have fixed, but it still returns this on the development server (live server is working, but we have 27000 rows so running this remotely is a bit slow).

Array ( [0] => Column 'last_edited_by' cannot be null [1] => Column 'entry' cannot be null )

We have last_edited_by set to Zero

     $admin->createPage([
                "parent" => 1,
                "nav_title" => $xmlitem->ItemDesc." | " .$xmlitem->SimpleColor,
                "in_nav" => "on",
                "template" => "Products",
                "new_window" => "new",
                "entry" => "new",
                "created_at" => "2018-12-28 03:16:44",
                "last_edited_by" => 0,

And the

 entry 

column does not even exist so that is a bit weird.

The problem still exists after we added

entry

#9 Developer Help » Search based on resources in page » December 27, 2018 6:09am

daansk44
Replies: 4

Hey,

When you make a page (template) with some resources in it.
Is it possible to search based on a specific resource (using a function)?
klx.png

#10 Re: Developer Help » Add pages using API » December 26, 2018 5:43am

Thank you, Tim, for your reply. I really Appreciate your help

We have replaced  the files to

templates\ajax\classes\SHOPXML

And try to call the function in the ajax/index file.

include 'classes/classloader.php';
$shopxml = new SHOPXML;
$shopxml->FetchProductsSHOPXML();

When we call it with the wrong data, it returns an error (that's okay).
But when we push the right data, it returns with nothing and does not make a page

public function FetchProductsSHOPXML()
    {
        $admin = new BigTreeAdmin;
        var_dump($admin->createPage());
        $admin->createPage([
            "parent" => 1,
            "nav_title" => "USB Stick",
            "template" => "Products",
            "resources" => [
                "ItemCode" => "MyCode",
                "Model" => "MyModel",
                "ItemDesc" => "qwerty",
                "ExtDesc" => "asdf",
            ],
            "meta_description" => "This is the SEO meta description",
            "title" => "This is the SEO page title",
        ], $publishing_change = true);
    }

It has no problem finding the function at all. But it does not generate an error

#11 Re: Developer Help » Add pages using API » December 25, 2018 7:47am

Thank you.

We are running in the next problem. We are writing a script that fetches an XML string and will loop through it.

class SHOPXML
{
    public $url;

    public function FetchandreturnShopXML($url)
    {
        $xml = simplexml_load_file($url);
        return($xml);
    }

    public function FetchProductsSHOPXML(){
         $admin = new BigTreeAdmin;
        var_dump($admin->createPage([
            "parent" => 1,
            "nav_title" => "USB Stick",
            "template" => "products",
            "resources" => [
                "ItemCode" => "MyCode",
                "Model" => "MyModel",
                "ItemDesc" => "qwerty",
                "ExtDesc" => "asdf"
            ],
            "meta_description" => "This is the SEO meta description",
            "title" => "This is the SEO page title"
        ]));
}

Since it is a script for a cronjob, we put it in `site\job\classes\SHOPXML`.
But it cannot find the call the createPage function.

Wich class do we need to call before we can use the createPage function


Fatal error: Uncaught Error: Class 'BigTreeCms' not found in C:\xampp\htdocs\projecten\xx\Source\site\job\classes\SHOPXML\index.php:4 Stack trace: #0 C:\xampp\htdocs\projecten\xx\Source\site\job\classes\classloader.php(3): include() #1 C:\xampp\htdocs\projecten\xx\Source\site\job\index.php(2): include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\projecten\xx\Source\site\job\classes\SHOPXML\index.php on line 4

When we call the function

  $admin = new BigTreeAdmin;
        var_dump($admin->createPage());[ /code]
It returns  [ code] Too few arguments to function BigTreeAdminBase::createPage(), 0 passed

That's okay. But when we call the function, using the code above. It returned NULL without making an page

#12 Re: Developer Help » Add pages using API » December 24, 2018 11:20am

Let's say I have made a Template file, named Products
And this contains some Resources

$Model = Model - Text
$ItemCode = ItemCode - Text
$ItemDesc = ItemDesc - Text
$ExtDesc = ExtDesc - Text

How can I make the page with this template and add the data to it?
Also, how can I fill in the SEO data smile

$admin->createPage([
    “parent” => 2,
     “nav_title” => “USB Stick”,
“Template“ => “Products“, 
“ItemCode“ => “MyCode“
]);

#13 Re: Developer Help » Add pages using API » December 24, 2018 10:21am

Thank you and we wish you a Merry Christmas from the Netherlands smile

#14 Re: Developer Help » Add pages using API » December 24, 2018 7:24am

Thanks for your reply. Suppose you want to create a (sub) page. As an example 'Products'. Below you will find a product 'products / usbstick'. How can you indicate that these are hung under products (2)?

#15 Developer Help » Loading composer packages in BigtreeCMS » December 23, 2018 7:20am

daansk44
Replies: 1

We want to load PHP packages using Composer in BigtreeCMS.
So that we can use extra functionalities, which are not standard in BigtreeCMS. After the installation, I can not find the vendor folder so quickly.

#17 Developer Help » Showing same website on two different domains » December 20, 2018 4:25am

daansk44
Replies: 2

Is it possible to show the same website on two different domains?
When you edit one website the other website is also updated.

And what about the images? Given that they are uploaded to just one website.
I know that you can link two websites with a database (via your environment file). But does not this present conflicts when uploading images?

#18 Re: Developer Help » Giving Users permissions to see analytics without the possibility » December 11, 2018 3:43pm

Yes it is, but if you login as normal user and you press this button

Knipsel.png

You get this message

knip-2.png

#19 Developer Help » Giving Users permissions to see analytics without the possibility » December 11, 2018 11:33am

daansk44
Replies: 3

We were wondering if it was possible to view all Google analytics as a user. Without having the possibility to adjust the configuration. This question is because we have multiple accounts in Google analytics, but we only want to show one (from the relevant website)

#21 Developer Help » Migrating from a development domain to a domain » December 5, 2018 12:32pm

daansk44
Replies: 2

Next week we go to from a development environment to an actual domain name. Maby it's a really basic question but do you need to change locations in the database (the website has a lot of content with links to own images)

#22 Developer Help » Bootstrap error in core » October 17, 2018 11:38am

daansk44
Replies: 1

Heey,

I've got an error in bigtree that says that it cannot load core/bootstrap.

error-bigtree.png

#23 Re: Developer Help » Loop trought menu » October 11, 2018 12:31pm

Okay I change some code.

<!doctype html>
<?php
$menu = BigTreeCms::getNavByParent($variables);
?>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="<?= $bigtree["config"]["www_root"] . 'site/css/basic.css';?>">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <meta name="description" content="<?=$page["meta_description"];?>" />
	<meta name="keywords" content="<?=$page["meta_keywords"];?>" />
	<meta name="robots" content="index, follow"/>
	<meta name="application-name" content="FLXcms" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta property="og:title" content="<?= $page['title']; ?>" />
	<meta property="og:url" content="<?=$page['link'];?>" />
	<meta property="og:image" content="" />
	<meta property="og:description" content="<?=$page["meta_description"];?>" />
	<meta property="og:type" content="website" />
	<meta property="dc:language" content="nl" />
	<meta property="dc:source" content="<?=$page['link'];?>" />
	<meta property="dc:title" content="<?= $page['title']; ?>" />
	<meta property="dc:keywords" content="<?=$page["meta_keywords"];?>" />
	<meta property="dc:description" content="<?=$page["meta_keywords"];?>" />
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title> <?= $page['title']; ?></title>

  </head>
  <!-- Menu -->
  <nav class="navbar navbar-expand-lg navbar-light bg-light">
  <a class="navbar-brand" href="/"><?= $page['title']; ?></a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarSupportedContent">
  <ul class="navbar-nav mr-auto">
    <?php
    foreach ($menu as $menuitem) { ?>
 
     <li class="nav-item">
        <a class="nav-link" href="<?=$menuitem["link"]?>"><?=$menuitem["title"];?></a>
      </li>
      
      <?php
    }
    ?>
    
    
      
    
     
    </ul>
    
  </div>
</nav>

#24 Developer Help » Loop trought menu » October 10, 2018 6:37am

daansk44
Replies: 3

Maby a really basic question. How can I call the complete menu (So I can loop trought it).
And second. I called a function

<?php
$hallo = new getNav();
?>

And I get this error (New install)

Fatal error: Uncaught Error: Call to undefined function getAll() in /home/xx/templates/layouts/_header.php:63 Stack trace: #0 
/home/xx/templates/layouts/default.php(1): include() #1 /home/xx/core/router.php(481): include('/home/franskrol...') #2 /home/xx/core/launch.php(133): include('/home/franskrol...') #3 /homexxl/site/index.php(3): include('/home/franskrol...') #4 {main} thrown in /home/xx/templates/layouts/_header.php on line 63

#25 Re: Developer Help » Bigtree form builder » September 4, 2018 8:03am

Is it possible to call the form in the template?

$form = new formbuilder('nameform')

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.