by rern » 28 Nov 2017, 04:52
Hi guys,
Sorry for the mess.
What happened?:
- RuneAudio 0.4b downloads and uses jQuery UI with <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
- Previous RuneUI Enhancement update switched from online download to a local file instead by commenting out the jQuery UI script line.
- This brought an issue as the line in footer.php is the last line with no trailing new line.
- A script for show/hide items feature, hammer.min.js, which was appended to the file with echo command ended up in the same line as jquery-ui.js. So it was also commented out which caused error for the feature.
- Then along came the mess.
- Tried to fix it by inserting a new line during Addons Menu installation but it left a lot of blank lines after multiple updates.
- Tried with heredoc but it just made the code cleaner, no escaped single quotes '"'"' > '.
- Tried to get rid of the blank lines with sed command and it worked.
- Since heredoc and sed modified the same file, moved heredoc lines to sed to do it in single command.
- No escaped single quotes in heredoc must be escaped in sed but I missed it.
- Appending lines to the end with sed, There's even no more blank lines in the first place.
Now it was fixed. Please uninstall > reinstall Addons Menu
By the way, a by-product of the fixing process is a feature like a silver bullet to restore RuneUI to default in case of something was wrong.
---------------------------------------------------------------
Browser URL:
< RuneAudio_IP >/restoreui.php
---------------------------------------------------------------
- available after install / update / reinstall Addons Menu
- RuneUI restored to default (header.php, playback.php, footer.php with Addons Menu ready)
- click Menu > Addons to reinstall Addons Menu
- installed addons show update status
- update each addon to get them back
rAudio @ https://github.com/rern/rAudio
Raspberry Pi 4B
Raspberry Pi 3B+ > SMSL M8 DAC
Raspberry Pi 3B
Raspberry Pi Zero 2
Raspberry Pi Zero W