Blank (new) block not found in home page?

Post Reply
User avatar
BobW55
Forecaster
Forecaster
Posts: 115
Joined: Thu Sep 28, 2017 11:43 pm
Location: Michigan USA
Station model: Davis Pro2
Software: Cumulus
Contact:

Blank (new) block not found in home page?

Post by BobW55 » Fri Dec 08, 2017 6:00 pm

I copied the folder "BLANK" to a new folder called "myGauges"

Folder tree looks like this:
public_html/template/homepage/blocks/myGauges

When I go into the block setup page, I see the block listed there.

When I go to add it to my desktop home page, it shows up in the list
HP.PNG
HP.PNG (44.51 KiB) Viewed 9316 times
When I try to run the actual page I get a message "Block not found"
Block myGauges not found. Check that you uploaded the block to the correct folder and also make sure you do not have a typo in the homepage setup.

The block is clearly spelled correctly and on the list?
http://melvinweather.com/template/indexDesktop.php
Davis Vantage Pro2 wired
Solar/UV sensors
Sky Cam
Ham radio K8pos

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: Blank (new) block not found in home page?

Post by Fraggboy » Fri Dec 08, 2017 6:14 pm

Bob..

I think I know what's going on here..

I take it that in the myGauges folder, you have another folder called blank? If so, move the contents from the blank folder and move them to the myGauges folder.

Once they have been moved, you can delete the folder named blank.
Image

User avatar
BobW55
Forecaster
Forecaster
Posts: 115
Joined: Thu Sep 28, 2017 11:43 pm
Location: Michigan USA
Station model: Davis Pro2
Software: Cumulus
Contact:

Re: Blank (new) block not found in home page?

Post by BobW55 » Fri Dec 08, 2017 6:39 pm

I have a folder named "myGauges"
with in that folder are the files: "myGauges.txt" and "myGauges.php"
the myGauges.txt reads
{"version":1.0,"name":"myGauges block","namespace":"myGauges"}

It shows up in the block list, and on the setup page.
I have made a few other blocks and they work
Very strange.
http://melvinweather.com/template/indexDesktop.php
Davis Vantage Pro2 wired
Solar/UV sensors
Sky Cam
Ham radio K8pos

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: Blank (new) block not found in home page?

Post by Fraggboy » Fri Dec 08, 2017 7:02 pm

Gotcha.. I have to agree. It is very strange indeed.
Image

User avatar
BobW55
Forecaster
Forecaster
Posts: 115
Joined: Thu Sep 28, 2017 11:43 pm
Location: Michigan USA
Station model: Davis Pro2
Software: Cumulus
Contact:

Re: Blank (new) block not found in home page?

Post by BobW55 » Fri Dec 08, 2017 9:53 pm

Looks like it will not allow any block that was produced using the "BLANK" template. unless you place the word "BLOCK"
as part of the file name of the PHP file.
Example:
mytest.php will not work
mytestBlock.php WILL work
http://melvinweather.com/template/indexDesktop.php
Davis Vantage Pro2 wired
Solar/UV sensors
Sky Cam
Ham radio K8pos

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: Blank (new) block not found in home page?

Post by Fraggboy » Fri Dec 08, 2017 10:13 pm

Bob,

Open up the blankConfig.txt.

You can provide a different name (Replace "Blank block" with whatever you want).

The namespace is what you will see when you place this block on the section of your page. Provide that a friendly name.

Make sure the namespace you choose is the name of the folder as well (Capitalization is very critical as well and will error out out if it's not an exact match).

You can then rename the blankConfig.txt to (Your_ProjectConfig.txt)

Source (Wiki): To summarize there are a few very important things that have to make sure you follow otherwise the page will not load properly:

- the name of each block must be exactly the same as the name of the folder in which you downloaded the block (also given as the namespace in the Block section)

- the block files must be included as a separate directory in the homepage/blocks directory of your template.

- each block can only be included on the homepage once!
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Blank (new) block not found in home page?

Post by Jachym » Fri Dec 08, 2017 10:40 pm

Hi,
yes, this is correct, it must be

namespace/namespaceBlock.php

thats what the template looks for

User avatar
BobW55
Forecaster
Forecaster
Posts: 115
Joined: Thu Sep 28, 2017 11:43 pm
Location: Michigan USA
Station model: Davis Pro2
Software: Cumulus
Contact:

Re: Blank (new) block not found in home page?

Post by BobW55 » Fri Dec 08, 2017 10:50 pm

Yes, that is correct. I should learn to take notes as I do stuff.
Made the naming mistake first time I tried to set up a block. Going to see if I can find a HTML/PHP class I can take.
Teaching ones self only goes so far.
Now to get this HTML page to display in the block with out using the damn IFRAME.
http://melvinweather.com/template/indexDesktop.php
Davis Vantage Pro2 wired
Solar/UV sensors
Sky Cam
Ham radio K8pos

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Blank (new) block not found in home page?

Post by Jachym » Fri Dec 08, 2017 10:53 pm

Everything you need is free on the internet. I learned 90% from Stackoverflow and the remaining 10% from other free websites.

User avatar
BobW55
Forecaster
Forecaster
Posts: 115
Joined: Thu Sep 28, 2017 11:43 pm
Location: Michigan USA
Station model: Davis Pro2
Software: Cumulus
Contact:

Re: Blank (new) block not found in home page?

Post by BobW55 » Fri Dec 08, 2017 11:12 pm

Those are the sites I use when I have a question.
My problem is I only Code here and there, so I do not remember it.
Use it or loose it as they say. I just feel if I could have someone to ask questions of, it would sink in much better.
I feel bad always having to ask, and not being able to provide the answers.
http://melvinweather.com/template/indexDesktop.php
Davis Vantage Pro2 wired
Solar/UV sensors
Sky Cam
Ham radio K8pos

Post Reply