Troubleshooting
Joomla! Problems








“Have you tried turning it OFF and ON again?”

by Peter Martin / @pe7er

Joomladay Austria 2016 in Vienna,
Friday 2nd December 2016

About me


Peter Martin (@pe7er)




Nijmegen, Netherlands

About me

www.db8.nl
Joomla support, application development


db8 Site Dev - free checklist component for devs


Organizes:
* Linux Usergroup Nijmegen
* Open Coffee Nijmegen

Joomla volunteer:
* Global Forum Moderator
* Joomla Bug Squad
* Pizza Bugs & Fun (in NL)

* Former Joomla Community
   Leadership Team (6 yr)
* Mentor GSoC 2016

Overview presentation

  • Introduction
  • Troubleshooting
  • Extensions
  • 10 most common errors
  • Tools
  • Questions?



Sheets of Presentation: http://slides.db8.nl
TV
TV
Reynholm Industries
IT Crowd

Jen, Maurice “Moss”& Roy

Troubleshooting

What can go wrong?

Troubleshooting

  • Make a backup first! (eg Akeeba)

  • Know differences Extensions:
    Components, Modules, Plugins, Templates & Language files

  • Find cause of error:
    • Check all different “chains”
    • Reproduce on different site / hosting
    • Change one parameter “extremely”, at a time & test.

  • Ask for help:
    • Ask the right question at right place
    • Give sufficient information, be concise, use bullet lists
    • Be “Open Source”! Thank for help + report back!

Extensions

5 Types of Extensions



  • Components

  • Modules

  • Plugins

  • Templates

  • Language Files

Components

  • Function: manages functionality on a page
    • multiple “Modi”: CRUD (Create, Read, Update, Delete)
    • only one component on a page

  • Display: in Template
    <jdoc:include type="component">

  • Activation: in URL: &option=com_component

  • Example: com_content

Modules

  • Function: supportive, only display to screen
    • one mode (e.g. read from database & display)
    • multiple modules on a page

  • Display: in Template in Module Position
    <jdoc:include type="modules" name="breadcrumb" style="none">

  • Activation: via menu item: URL + &Itemid=x

  • Example: mod_breadcrumbs

Plugins

  • Function: supportive. Works invisible in background.
    • one mode: does one thing (e.g. search & replace)
    • multiple plugins at a time

  • Display: no, only result

  • Activation: “events” (or “hooks”) in components

  • Example: Content - Email Cloaking

Templates

  • Function: supportive. Layout of website.
    • one mode (Display HTML with CSS & “Elements”)
    • one template on a page; multiple possible

  • Display: always

  • Activation: default or assigned in Menu Item

  • Example: Protostar

Language Files

  • Function: supportive. Translation of “system labels”
    • one language at a time (on a page)
    • multiple possible → multilingual website

  • Display: language labels

  • Activation: default Language & Language Overrides in file

  • Example: "Read more" /language/de-AT/de-AT.ini

Search: Component + Module + Plugin

10 most common errors

1. “Blank Page”

Error 1: “Blank Page”

After Upgrade - blank page in the front and backend!
Getting blank page when enabling the Search Engine Friendly
Why my site is blank page after moving to other server?
Searching returns blank page!
Blank page after admin login

Calling my friend Roy

Calling my friend Roy

Solution 1: “Blank Page”

OFF & ON again?
Blank page = PHP error & display errors = OFF

  • switch ON in Joomla:
    System > Global Configuration > [Server] >
    Error Reporting: Maximum

  • on server: Increase PHP error level:
    in php.ini or
    .htaccess
    php_flag display_errors on
    php_value error_reporting -1

“Deprecated”

Error 2: “Deprecated”

Deprecated: Function eregi() is deprecated in /home/public_html/includes/sef.php on line 393

Deprecated: Function set_magic_quotes_runtime() is deprecated in /var/www/libraries/phpmailer/phpmailer.php on line 1218

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/modules/mod_exmenu-j15/exmenu/exmenu.class.php on line 56

Deprecated: Function split() is deprecated in /var/www/libraries/phpmailer/phpmailer.php on line 470

I'm sorry,
are you from
the past?

Solution 2: “Deprecated”

ErrorWarning: “Some PHP function will not be available
anymore in next PHP version”

  • Solution: Get it fixed!
    Joomla? Report in bugtracker
    3rd party extension? Contact developer

  • Workaround: Hide warning
    In php.ini:
    error_reporting  = E_ALL & ~E_DEPRECATED
    In .htaccess:
    php_flag display_errors off

“Missing Class”

Error 3: “Missing Class”

Fatal error: Class 'JConfig' not found in /var/www/includes/framework.php on line 56

Fatal error: Class 'XMLReader' not found in /libraries/cms/feed/factory.php on line 69

Fatal error: Class 'ModMenuHelper' not found in /joomla/administrator/modules/mod_menu/ tmpl/default_enabled.php on line 173

Fatal error: Class 'JError' not found in /public_html/includes/framework.php on line 42

I am the head of IT

and I have it on
good authority that...

if you type "Google"
into Google,

you can break
the Internet.

Solution 3: “Missing Class”

  • Google the error
    Not too specific!
    Remove “unique text” like your own folder structure

  • Re-upload files
    get original Joomla full package from same version
    upload all files overwriting the ones on the server

    or: Components > Joomla Update > [Check for Updates] > [Reinstall Joomla core files]

“Nothing changes”

Error 4: “Nothing changes”

I changed x but does not work
Start Publishing does not work at all
Show Title does not work
Article changes not visible in front end
Main menu not showing on Multilingual website
Articles not showing...!? How could this be?
My site description not showing on google
Images not visible in Category Blog
Submenu items not visible anymore in J3.1.1?

Solution 4: “Nothing changes”

Memory = RAM? ah, Cache = Memory = RAM.

  • Cache
    Refresh (“hard refresh”: CTRL + F5)
    Test with other browser
    Empty browser cache, Joomla's cache,
    server cache (Varnish & hosting server cache)
  • Check
    Check server or localhost!
    Check Template Overrides & hardcoded stuff in template
    Check ACL, Language etc
  • Test
    Switch OFF SEF URLs
    Change parameters with “extreme” numbers

“404”

Error 5: “404”

Menus don't work
Site does not work after move to other server
404 error for all article/site links
please help!!!! menu items give 404 error
Menu item no longer working - returns with 404 error
404 errors on all links, front page of joomla fine
URGENT help error 404

What does IT
stand for?

What does it
stand for?....

What doesn't it
stand for?

Solution 5: “404, etc”

What does an error number stand for? https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

  • 404 Not Found = Client error
    Search Engine Friendly + URL rewrite (mod_rewrite)
    Apache: rename htaccess.txt to .htaccess
    Microsoft IIS7: rename web.config.txt to web.config

  • 500 Internal Server Error = Server error
    disable .htaccess

“Can't login”

Error 6: “Can't login”

I can't login to my admin panel
Site Hacked and now locked out of admin
Cannot log in into /administrator back-end
Can't login admin or user.
Cannot Access Administration Page
Cannot login to backend
After move of site cannot login, loop
Locked out of the Admin
Super User Locked Out of Joomla 3.6

Solution 6: “Can't login”

  • /administrator/ not available?
    security extension? → ?token-after-url
    Temp disable: use FTP rename /plugins/system/sec-ext/

  • Username + Password not working
    create new Super User + Password via FTP / phpMyAdmin

  • New Username + Password still not working
    use phpMyAdmin, check plugins in #__extensions:
    plg_user_Joomla → enabled = 1 ?
    plg_authentication_joomla → enabled = 1 ?

“Can't install”

Error 7: “Can't install”

Cannot install any templates, plugins, modules or components
Cannot install extensions on Joomla! 3.6
Help - Can't install extensions, JFolder::files: Path is not a folder.
JInstaller::install: Failed to copy file
Unable to Find Install Package
Cannot install XYZ in Joomla on Hosting ZYX
Joomla cannot install; JSON issue
JInstaller::Install: Cannot find Joomla XML setup file
Can't install extensions

Solution 7: “Can't install”

  • Questions:
    Specific Extension or all Extensions?
    Specific Server? Try on local server?
    Has .zip file .xml or UNZIP first? Right Joomla version?
  • Check:
    Permissions: Files 644, Folders 755
    Ownership (FTP user vs Webserver) -> check FTP
    System > System Information > Directory Permissions
    PHP File Upload (file_uploads = ON)
    PHP Max Upload Size (upload_max_filesize > 10M)
    Available Disk Space
  • Workaround?
    Unzip in /tmp/ folder and “Install from Directory”?

“How to remove...”

Error 8: “How to remove...”

Changing the background color?
How can I Remove the "Powered by XYZ"?
How to change the colour of the article title text?
Change logo?
Possibility to change text color in article?
Logo change position?
Change module position?
Change H3 to another header in moduletable:
Remove copyright info at the bottom?

Solution 8: “How to remove...”

  • Analyze HTML/CSS with browser
    Google Chrome's Inspector, FireFox + FireBug
    Web Developer Addon
  • Use IDE :PHPStorm, Netbeans, Eclipse, etc.

  • Module? Display Module Positions:
    Extensions > Templates > [Options] > Preview Module Positions: Enabled
    URL + ?tp=1
  • Template? Test: Change to default template
  • Plugin? Test: Disable plugin
  • Component or Module? HTML or Layout override?

“Slow website”

Error 9: “Website slow”

Why is my website so slow to load?
Slow website! Is it my hosting?
Website loading to slow
Changes to web page slow to load
My website is loading extremely slow
Slow queries on large website
Slow loading website (unstable performance)
Very slow page loading (Waiting on fonts.googleapis.com)
Trying to increase the speed of my website
It's too slow

Have you tried
forcing an unexpected
reboot?

Solution 9: “Website slow”

  • Analyze database queries
    Joomla's debug mode & check queries

  • Analyze loading time
    Yslow (FireFox / Chrome browser addon)

  • Compare loading of website
    backup (with Akeeba)
    restore backup on local PC (with XAMPP)
    test speed & compare

  • Use Cache
    Joomla Cache, Server Cache, etc

“S1t3 G0t H@ck3d!”

Error 10: “Site got hacked”

Unwanted Advertiser Pop-up appearing on admin front end.
Webhost malware scan deletes some files
Search Engine Results show Site Maybe Hacked and Results in Japanese
Website got hacked by insert PHP code in all file
I got hacked.... Cant reset superuser password
Just got hacked, advice needed
I just got hacked by xxxx -aarrgghh!
Site Hacked And Cannot Login to Admin Area
My site has been hacjed! please help
Got Hacked

Dear Sir stroke Madam

Fire, exclamation mark

Fire, exclamation mark

Help me, exclamation mark

Solution 10: “Hacked website”

Don't panic!

  • Safeguard
    old backups
    backup hacked website
    server access log files

  • Analysis to find cause
    Joomla + 3rd party versions?
    server access log files

    analyse hacked files:
    • Check files (Base64) code?
    • Scan files (NeoPi)
    • Compare original (Meld)


  • Recover
    cleanup site (restore or rebuild)
    • work OFFLINE on a local server

    solve security problems & update
    new Google sitemap + 410 Gone
    change ALL passwords (FTP, DB, Joomla)

  • Inform
    customer (immediately!)
    hosting party
    developer
    users website
    community

Tools

Tools 1/3

  • Joomla
    • Other Joomla site with example data
    • Joomla Debug mode
    • Joomla SEF OFF -> full URL with all commands

    • Joomla System Info
      • PHP Information
      • Directory Permissions

    • 3rd party Extensions

Tools 2/3

  • Server
    • Apache Webserver access & error logfiles
    • PHP error logfile
    • .htaccess

  • Database
    • phpMyAdmin
    • SQL dump = text file = searchable

  • Code (PHP, HTML, Language strings)
    • Integrated Development Environment (IDE)
      PHPStorm, NetBeans, Eclipse

Tools 3/3

  • HTML Output
    • Inspect HTML / CSS / JS
      • Google Chrome → Inspect
      • FireFox + Firebug Addon
    • Web Developer (browser Addon)
    • YSlow (browser Addon)

  • Various
    • Akeeba Backup
    • Local webserver (XAMPP, MAMP, WAMP, LAMP)
    • Meld diff

Questions?

Thanks!



Peter Martin
e-mail: info at db8.nl
twitter: @pe7er
presentation: https://db8.nl

Credits 1/2

Credits 2/2