Issue updating

I’m not sure where to post this, apologies if it’s under the wrong category.

I’m having an issue with the web interface after updating to the latest build (10.0.2?). The SD image version is emonSD-30Oct18 and I’ve only had the emonpi for a couple of months.

The main issue since upgrading is the new navigation menu on the left hand side doesn’t have a link to apps, I can manually enter the URL to view them. This is most likely due to me modifying two css style sheets (config.css and pagenav.css) to adjust the wide of the mysolar app page just prior to attempting to update to fix an unrelated issue with virtual feeds.

I can see the following in the update log but I haven’t used git before so not sure how to resolve it or even if the issue is related to the changes I made.

On branch stable
Your branch is up-to-date with ‘origin/stable’.
Changes to be committed:
(use “git reset HEAD …” to unstage)
modified: Views/css/config.css
modified: Views/css/pagenav.css

The second issues occurred while trying to fix the above and/or running another update, I now see the following displayed at the top of navigation menu:

Warning : parse_url() expects parameter 1 to be string, array given in /var/www/emoncms/Lib/misc/nav_functions.php on line 706

Warning : parse_url() expects parameter 1 to be string, array given in /var/www/emoncms/Lib/misc/nav_functions.php on line 733.

I assume that fixing the first issue and updating again will resolve this but I’m not sure.

Please could someone advise what I need to do to resolve this, ideally i want retain the style sheet changes but allow update to run correctly, I’d also rather not wipe the SD card and start from scratch.

Hi,

First thing is to see what is going on. I will assume you have SSH access (if not I can work through that).

cd /var/www/emoncms/
git status

If you can post that (copy it out of the terminal window and pate here with 3 backticks; top left of keyboard, on a line before and after) we can start there.

HI Brian

This is the output from git status.


On branch stable

Your branch is behind 'origin/stable' by 34 commits, and can
be fast-forwarded.

(use "git pull" to update your local
branch)

Changes not staged for commit:

(use "git add <file>..." to update
what will be committed)

(use "git checkout -- <file>..." to
discard changes in working directory)

 

modified:   Theme/basic/emoncms-base.css

 

no changes added to commit (use "git add" and/or
"git commit -a")

Thanks

Darren

First thing is to update your local git repo (does not change the local files)

git fetch --all

next, compare your file against the file now in the stable branch (I don’t think it needs the full file path but it might)

git diff stable Theme/basic/emoncms-base.css

At this point there are 2 options, if the differences are simply what you have made, you can effectively do a save, update the files from git and the overwrite with your changed file.

However, if there are more differences than just those you made, you will be best to re-apply your changes.

So what are the differences between the files?

Hi Brian

The only difference in that file is the one I made:

sudo git diff stable Theme/basic/emoncms-base.css
diff --git a/Theme/basic/emoncms-base.css b/Theme/basic/emoncms-base.css
index b8b6b70c..74170b2d 100644
--- a/Theme/basic/emoncms-base.css
+++ b/Theme/basic/emoncms-base.css
@@ -1,7 +1,7 @@
 html,body{height: initial!important}

 body.app #wrap {
-  max-width:1150px;
+  max-width:2050px;
 }

 #wrap{

Darren

Ok so the solution is reasonably simple.

sudo git stash
sudo git pull
sudo git stash pop

stash stashes (hides) the changed files. You can now do a pull to merge in the changes made. The stash pop brings the changed files back into the working directory structure.

I suggest you offer your change as a PR on GitHub or @emrys might be able to look at it else you will have to do this every time!

1 Like

So that appears to have fixed the second issue, Warning : parse_url() expects parameter 1 to be string however the first issue is still present, l can’t see a link to the app view on the navigation bar.

This has been fixed in the master branch. I’m hoping a patch will come out shortly.

Thank you for your help.

Latest master has been merged to stable today, it includes a nice speed improvement to the input interface as well Release v10.1.1 · emoncms/emoncms · GitHub (+further work on this coming).