Technical Challenges Bruce Scherzinger Northern Virginia JUG - - PowerPoint PPT Presentation

technical challenges
SMART_READER_LITE
LIVE PREVIEW

Technical Challenges Bruce Scherzinger Northern Virginia JUG - - PowerPoint PPT Presentation

A Few Choice Technical Challenges Bruce Scherzinger Northern Virginia JUG Co-Founder and Chair Professional Aerospace Software Systems Engineer First presented July 20, 2017 Agenda Investigating and fixing a template problem


slide-1
SLIDE 1

A Few Choice Technical Challenges

Bruce Scherzinger Northern Virginia JUG Co-Founder and Chair Professional Aerospace Software Systems Engineer First presented July 20, 2017

slide-2
SLIDE 2

 Investigating and fixing a template problem  Integrating Dada Mail with Joomla  Using Jaspersoft iReport to print a member directory

Agenda

Note: This presentation is designed for parallel demonstration using a live Joomla website.

slide-3
SLIDE 3

Template Problem Investigation

JoomlART Purity III / T3 Platform

slide-4
SLIDE 4

 Template: JoomlArt’s Purity III (v1.2.0)

 Requires T3 framework (v2.6.5)

 Joomla: v3.7  Issue: Front end article editing not possible  Diagnostic tools used:

 Chrome browser element inspector  Joomla site debug mode  Patience and persistence

JoomlART Purity III Template

slide-5
SLIDE 5

 Editing an article in site front end, no editor toolbar or buttons present, no page styling at all.  No way to cancel the edit, so article remained locked until unlocked in back end editor, which was working.  Using Chrome’s inspector, template code was simply not there. Page was stark in content. Article HTML (content) did load into editor text box.  At first it appeared to be an editor or ACL problem, but it occurred regardless which editor was used.

Template Symptoms

slide-6
SLIDE 6

 Using Chrome, right-click page, Inspect Element.  Usual <head> tag was empty. Immediately apparent, template was not being loaded.  Set site error level to Development. Reloaded page.  PHP error reported identified an illegal object reference in a file in the t3-assets templates subfolder.  Found additional similar references in the same area

  • f the file.

Finding the Error

slide-7
SLIDE 7

Debugging Symptoms

 Front-end editing an article  Using Google Chrome’s element inspector, you can see there’s very little HTML

  • n this page.

 It is clear the template code did not load.

slide-8
SLIDE 8

 Using Development level error reporting and reopening the editor in the front end caused this error to be reported: Fatal error: Cannot use object of type ContentViewForm as array in /home/userid/public_html/mydomain.co m/plugins/system/t3/base- bs3/html/layouts/joomla/edit/params.php

  • n line 13

Debugging Symptoms

slide-9
SLIDE 9

Lines 13-15 are using the $displaydata

  • bject as an

array. Searching for another params.php file in the t3 folders that might hold a clue.

The Devil is in the Details

slide-10
SLIDE 10

 Found same-named file in another t3 folder and found different code there.  Copied the lines of code used in the presumably correct code to replace the errant code.  PROBLEM SOLVED!

Workaround/Temporary Fix

slide-11
SLIDE 11

 Found similar code in the file plugins/system/t3/base/html/layouts/joomla/edit/params.php that did not use $displaydata as an array.  Copied the base-bs3 code to the base params.php file for the fix.

Applying the Workaround

t3/base-bs3/ file t3/base/ file

slide-12
SLIDE 12

 This is how the editor is supposed to look!

(looks like I need to work on that Captcha box alignment)

Voila!

slide-13
SLIDE 13

 Reported issue to JoomlArt via their user support forum using the same screen clips used here.  Checked with others using the Purity III template on a fresh Joomla 3.7 installation. Symptoms not present.  So…How Did This Happen? Some ideas…

 Template update process did not replace the errant file.  JA style management maintains many copies of similar

  • files. Perhaps I stumbled onto one that didn’t update;
  • ne that was generated from my customizations.

Follow-up

slide-14
SLIDE 14

 Note: Accessing some links may require a user account.

 Forum post/discussion of my report of the issue

 https://www.joomlart.com/forums/topic/bug-found-in-t3-2- 6-5

 Purity III Template Download

 https://www.joomlart.com/downloads/free- templates/purity-iii/

 JoomlART Free Templates

 https://www.joomlart.com/downloads/

Purity III Template Links

slide-15
SLIDE 15

Integrating Dada Mail with Joomla

Website Member-based Community Email Lists by

slide-16
SLIDE 16

 Does your community site need an email list?  Are you tired of paying for a third party service?  Is PHP-based mailing not cutting it for you?  Do you want your site login to provide access?  YOU NEED AN INTEGRATED SOLUTION!  Dada Mail may be the answer.

Integrating Dada Mail with Joomla

slide-17
SLIDE 17

 A Perl script written by Justin Simoni.

 Over a decade of development and support.

 Free to use, support requires a subscription.

 Free version supports up to 3 lists.

 Has its own web interface, mainly for administration.  Uses any email account with POP3/SMTP access.

 Not dependent on Joomla site server being up and running.

 Uses text files or MySQL for data management.

 MySQL option allows integrating with Joomla.

 Cronjob runs script at scheduled interval.

 No site activity required. Site can be in maintenance mode.  Dada Bridge plug-in allows members to use their favorite email client or service.

Dada Mail

slide-18
SLIDE 18

 I developed the Dada Mail Subscriptions CB plugin for my HOA community website in 2006. Still in use.

 Need arose when neighbors couldn’t keep website and Mailman logins straight. Demanded integrated solution.  Allows site members to click checkboxes to subscribe to and unsubscribe from lists.  Notifies user & admin of subscription changes

 Hasn’t changed much. Just maintaining compatibility.  Still based on Community Builder, but future version using Joomla custom profile fields might be possible.

Dada Mail Subscriptions CB Plugin

slide-19
SLIDE 19

 Install DadaMail using the same database as the Joomla site.

 Configure DadaMail to your preferences, USE MySQL.  Create your lists. Recommend making lists “closed”.

 Install Community Builder. Configure to preference.

 Add one profile field per email address to support.

 Install and configure Dada Mail Subscriptions CB Plugin.

 Enter Dada Mail settings database table name (dada_settings)  Identify email address fields by name (email, cb_email1, etc.)

 Multiple email addresses must be enabled if desired

 Setup notification messages

 Set to admin, user, or both  Email subject, return address, etc.  Message/subject tags: [USER], [SITE], [EMAIL], [OLD], [LIST]

Setting it Up

slide-20
SLIDE 20

CB Email List Profile Fields

Each email list needs a field setup like the one on the left. Use single for only

  • ne list or multiple for several lists.

Add one option for each list, e.g.:

  • Account Email
  • Email #2
  • Email #3

Each email address in addition to the account email needs a field like the one on the right. It is recommended that all of these fields be located on a profile tab specifically for email lists.

slide-21
SLIDE 21

Plugin Configuration Panel

slide-22
SLIDE 22

 It is critically important that you specify the options for the email list in the exact same order you specify the email address database field names in the plug-in configuration.

Email List Field Options

Plug-in fields configuration List field options configuration

slide-23
SLIDE 23

 A separate profile tab for Email Lists is recommended.  Explain for each list:

 Usage  Restrictions  Privacy policy

 Create a multi-select checkbox field for each list:

 One checkbox field for each email address supported  Could use multi-select drop list field, but uglier

 Put fields for additional email addresses on this tab.

User Profile Layout

slide-24
SLIDE 24

Sample Email Lists Tab Layout

Use of the Regular Labs Tabs & Sliders plugins is highly recommended

slide-25
SLIDE 25

 Uses the Community Builder event system.

 Events generated for front or back end profile updates

 Plugin checks for changes to named email fields  Updates Dada Mail subscriptions table directly  Sends email notifications as configured

 Event generated for new, approved site registrations

 Auto-subscribe option in plugin configuration

 Event generated for user deletion

 Plugin deletes all Dada Mail subscription records for all addresses in named email fields  Sends an unsubscribe notification email

How it Works

slide-26
SLIDE 26

 JoomlaCode.org is where open source Joomla developers archive their code.  I also use this as my release and download system

Change Management & Distribution

slide-27
SLIDE 27

 Dada Mail Product webpage

 http://dadamailproject.com

 Download

 There’s a free download link on this page  http://dadamailproject.com/purchase/pro.html

 Community Builder

 Joomlapolis account required for free downloads  http://joomlapolis.com

 Dada Mail Subscriptions CB Plugin

 http://joomlacode.org/gf/project/dadamailmanager/frs/  Note: The manager component is obsolete

Dada Mail Integration Links

slide-28
SLIDE 28

Jaspersoft iReport Designer

Creating Reports from Your Joomla Site Database with

slide-29
SLIDE 29

 A free report design tool (no longer supported)

 An Eclipse-based replacement is available, but is HUGE

 Uses a combination of SQL and Java to produce beautiful reports.

 Similar in concept to MS Access report designer.  Yes, you need to write code!   Yes, you need to understand the database schema.   But it’s largely a visual tool. 

 Accesses your MySQL server directly.

 May require IP permission grant by hosting company.  Queries can be any combination of database tables.

Jaspersoft iReport Designer

slide-30
SLIDE 30

 Determine your report layout.  Determine the query needed to populate the report.  Setup server “data source” and test connection.  Use Designer to implement the report.

 Enter complete query and run a test.  Consider font size, column width, page layout, same as you would for any other app (e.g., Word, Excel, etc.)  Add fields from query to the report.

 Test periodically to ensure query provides data as expected  Adjust as needed after previewing full report result.  Save final report design.

 Open report template at any later time to generate, preview, and print.

Basic Usage Concept

slide-31
SLIDE 31

iReport Designer Opening Screen

  • A couple wizards

for first-timers.

  • Some helpful

support links.

  • Ads for their other

(paid) products.

slide-32
SLIDE 32

 Included drivers make data source setup a snap.

Data Source Setup

slide-33
SLIDE 33

 iReport Designer queries are a combination of SQL and Java.

 You need a decent understanding of SQL  You won’t be writing a whole Java program

 You’ll only use language snippets for formatting

 Main query provides all data fields used in the report.

Queries are the Key

(or is it vice versa?)

slide-34
SLIDE 34

 Sample report in Designer

 Page header  Column heading  Data record  Page footer

 Java used to combine fields

Reports are Handy

(you can hold them in your hands)

slide-35
SLIDE 35

 Preview in Designer allows you to see your report before printing.  Note group headings: first letter of last name.

 Last heading repeats on next page if necessary

Report Preview

slide-36
SLIDE 36

 Tutorial

 Not for the latest version, but close enough

 https://www.jaspersoft.com/olp/developing-reports- jaspersoft-ireport-designer

 Download Jasper iReport

 v5.6.0 was the last release before product was dropped

 https://sourceforge.net/projects/ireport/

 Replacement product, TIBCO Jaspersoft Studio

 v6.4.0 is the latest release

 https://sourceforge.net/projects/jasperstudio/

Jaspersoft Product Links