Menu

Citation not being made.

Help
pmdw
2019-05-11
2019-07-07
  • pmdw

    pmdw - 2019-05-11

    Hi
    I am having a problem with citations not being made.
    I can go into any of the editing areas and then select (click on) Insert citation.
    A new pop up window will open and I can search and get a list of resources.
    I can choose a resource and then click on the cite button at this point nothing happens.
    The window does not close and the cite tag is not inserted into the text.

    I have enabled CMS under the Configure Wikindx - Configuration options:

    I have tried various web browsers (Edge Firefox Opera Chrome) but there is
    no change in behaviour.

    The README_CMS.txt does not give very clear directions as to what settings if
    any must be made in the config.php for citations.
    I have tried setting $WIKINDX_CMS_BIBSTYLE=true in the config.php but it
    does not help.

    I am not getting any errors in my apache php error logs.

    My system set up is as follows:
    Ubuntu 16.04 , php 7.0, mysql 5.7.26. , wikindx 5.7

    How would I go about resolving this error?

    Thank you for your time.
    Peter

     
  • Mark Grimshaw

    Mark Grimshaw - 2019-05-11

    Hi Peter,

    Sorry to hear you're having problems. Was it all working on earlier versions of wikindx?

    For what you want to do, no CMS (Content Management System) variable will have any effect.

    Your system seems fine.

    Do you get any error message when you turn on error reporting in the Debugging section of Admin|Configure?

    As you're using Firefox, you can see if there are any javascript errors by turning on the web console from Firefox's Tools|Web Developer menu.

    Regards,

    Mark

     
  • pmdw

    pmdw - 2019-05-12

    Hi Mark
    Thank you for the quick reply .

    I have turned on the smarty templates and php errors and the SQL.
    I am not getting anything that says error on the screen when I click on the cite button.
    I can choose a different resources to cite but it does not change the behaviour.

    I will need to try the developer tools debug thing.
    Just to note:
    I will probably not be able to get back to this in this week as I am travelling.

    Regards
    Peter

     
  • pmdw

    pmdw - 2019-05-12

    Hi Mark
    Just a quick note:
    When I try to debug the site and click on the site button I get an exception
    citedialog.insert();
    onclick
    TypeError: citedialog is undefined.

    In the web source it refers to a wikindxCitedialog.js
    But there is a wikindxCitedialog.js and it is in wikindx/core/tiny_mce/plugins/wikindxCite/js and on line 3 it has var citedialog and a insert : function() on line 7 .

    Not sure why it cannot find it maybe some kind of path issue?
    Going to have to leave it at that for now.
    Regards
    Peter

     
    • Stéphane Aulery

      Hello pmdw,

      Maybe you site is misconfigured.

      Can we see this bug online?

      Regards,

      Stéphane

       
  • Mark Grimshaw

    Mark Grimshaw - 2019-05-13

    Hi Peter,

    In config.php, is there a value for $WIKINDX_WIKINDX_PATH?

    If not, try setting that.

    regards,

    Mark

     
  • pmdw

    pmdw - 2019-06-07

    Hi

    I have set the $WIKINDX_WIKINDX_PATH to be equal to my install dir
    eg :
    public $WIKINDX_WIKINDX_PATH = "C:\Bitnami\wampstack\apps\wikindx\htdocs" ;

    I have restarted the server and that did not help.
    I have installed the service on windows system and I am actually getting the
    same error.

    I have also downloaded and installed the latest version of wikindx 5.7.3 and
    installed that on my windows machine and I am still getting this error.

    When I try to debug with firefox I get the following in the console output:

    The script from “http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/dialog.php/core/javascript/progressbar.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
    dialog.php
    The script from “http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/dialog.php/templates/default/template.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
    dialog.php
    The script from “http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/dialog.php/core/javascript/coreJavascript.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
    dialog.php
    SyntaxError: expected expression, got '<'
    coreJavascript.js:1
    SyntaxError: expected expression, got '<'
    progressbar.js:1
    The script from “http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/dialog.php/core/ajax/ajax.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
    dialog.php
    The script from “http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/dialog.php/core/ajax/json2.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
    dialog.php
    SyntaxError: expected expression, got '<'
    json2.js:1
    SyntaxError: expected expression, got '<'
    ajax.js:1
    SyntaxError: expected expression, got '<'
    template.js:1
    The script from “http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/dialog.php/core/tiny_mce/tiny_mce_popup.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
    dialog.php
    SyntaxError: expected expression, got '<'
    tiny_mce_popup.js:1
    ReferenceError: tinyMCEPopup is not defined
    wikindxCitedialog.js:1:1
    <anonymous> http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/js/wikindxCitedialog.js:1
    Source map error: request failed with status 404
    Resource URL: http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/dialog.php
    Source Map URL: ../sourcemaps/inpage.js.map</anonymous>

    Source map error: TypeError: NetworkError when attempting to fetch resource.
    Resource URL: moz-extension://04778a89-b3b3-44d0-864a-8acbfcd5e02c/contentscript.js
    Source Map URL: ../sourcemaps/contentscript.js.map

    Source map error: request failed with status 404
    Resource URL: http://localhost/wikindx/core/tiny_mce/plugins/wikindxCite/dialog.php
    Source Map URL: ../sourcemaps/inpage.js.map

    TypeError: citedialog is undefined
    dialog.php:1:1
    onmozfullscreenchange is deprecated. dialog.php:1
    onmozfullscreenerror is deprecated. dialog.php:1
    The ‘content’ attribute of Window objects is deprecated. Please use ‘window.top’ instead. dialog.php:1
    ==================================

    The debug gives the following:

    Pause on caught exceptions
    Paused on exception
    TypeError: citedialog is undefined
    null
    ==================================

    Any hints on how to fix this would be appreciated.
    Peter

    (B.T.W. There is also a lot of mac ._<filename> clutter added in the latest download
    that does not help when trying to look at files.) </filename>

     
  • Mark Grimshaw

    Mark Grimshaw - 2019-06-07

    Hi Peter,

    We'll look into it and get back asap.

    Regards,

    Mark

     
    • Stéphane Aulery

      Hi Peter,

      Please try

      public $WIKINDX_WIKINDX_PATH = "C:\\Bitnami\\wampstack\\apps\\wikindx\\htdocs" ;

      instead of

      public $WIKINDX_WIKINDX_PATH = "C:\Bitnami\wampstack\apps\wikindx\htdocs" ;

      Regards,

      --
      Stéphane

       
  • pmdw

    pmdw - 2019-06-07

    Hi Stephane

    I have tried the setting you sugested:
    public $WIKINDX_WIKINDX_PATH = "C:\Bitnami\wampstack\apps\wikindx\htdocs" ;

    I restarted the apache server and cleared the browser history and it did not help

    I have also stopped the firewall and my antivirus and removed all the browser extentions just to try and eliminate any possible external blocks.

    In the debug for Edge I am getting the following:
    SCRIPT5009: 'tinyMCEPopup' is not defined
    wikindxCitedialog.js (1,1)
    SCRIPT5007: Unable to get property 'insert' of undefined or null reference
    dialog.php (89,625)

    I did check and wikindxCitedialog.js is in :
    C:\Bitnami\wampstack\apps\wikindx\htdocs\core\tiny_mce\plugins\wikindxCite\js

    I think it may be missing a refrence to tinyMCEPopup somewhere. I am getting the attached html in the cite dialog pop-up.

    Thank you taking the time to support me.
    Peter

     
    • Stéphane Aulery

      On Edge only ? If that the case it will be hard for me to test it because Edge is not available on Windows 7.

      Could you give me a screenshot of the console output of Edge (with F12)?

       
  • pmdw

    pmdw - 2019-06-07

    Hi Stephane
    It is not just with Edge it is also with Opera and Firefox , just it was easier to remove all the browser extentions on Edge.
    Please see attached.
    Thank you
    Peter

     

    Last edit: pmdw 2019-06-07
    • Stéphane Aulery

      IMHO, we provide an option to install Wikindx this way but it is an error nest. Have you properly setup $WIKINDX_BASE_URL? This page must be styled and it is not because CSS / JS resources are not included properly.

      A better way is to define a virtual host in the web server for a domain name that is resolved locally (in the hosts file of the machine). For example wikindx.local.

      The documentation page of your web server about vhost is a bit misleading. There are tons of good tutorials about setting up an apache vhost like:

      Its basic but that did the job for a quick start and allows you to configure several isolated websites.

       
  • pmdw

    pmdw - 2019-06-24

    Hi
    I am still trying to resolve this issue. I have tried differing system configurations but it is not helping. What is most frustrating is I can see it all working on your demo site. :-(
    Can you please tell me what the system setup is you are using so I can try and set up a matching VM on my side.
    I would like to know what OS, webserver, PHP database and versionof each you have on the demo server please.
    Thank you
    Peter

     
    • Joachim

      Joachim - 2019-06-24

      Hi Peter,

      I can tell you mine (http://www.bobc.uni-bonn.de/, more than 12,000 resources).

      OS: Debian Linux 9.9 aka stretch (on a VmWare VM 32 bit, 64 bit would probably be better)
      Webserver: nginx 1.10.3
      PHP 7.0
      MariaDB 10.1

      Best
      Joachim

       

      Last edit: Stéphane Aulery 2024-02-20
      • pmdw

        pmdw - 2019-06-24

        Hi Joachim
        Vielen Dank

         
    • Stéphane Aulery

      Hi pmdw,

      If your server is online, I can help you for the setup.

      Regards,

      --
      Stéphane

       
      • pmdw

        pmdw - 2019-06-26

        Hi Stéphane
        Thank you for the offer and your patience . However the server is a on an internal network that I cannot open to the www.

        I am going to set up a VM or two with the setups that Joachim and Mark are using and see if that helps.
        Regards
        Peter

         
  • Mark Grimshaw

    Mark Grimshaw - 2019-06-24

    Hi Peter,

    The test server has:
    MySQL 5.7.23
    PHP 7.2.19
    OS – unknown as it's a hosting site.

    My development environment is:
    MariaDb 10.1.37
    PHP 7.3.1
    OS Mac OSX 10.14.5

    Regards,

    Mark

     
  • pmdw

    pmdw - 2019-07-05

    Hi All

    I am very sure my problem is a path issue of some kind and I will need to look
    into it and fix it. However I have solution for now.

    On my windows test system
    if I copy the folder :
    htdocs\core\tiny_mce\plugins\wikindxCite\js
    to
    htdocs\js

    In my config.php I have the following set
    public $WIKINDX_BASE_URL = "http://localhost/wikindx" ;
    public $WIKINDX_WIKINDX_PATH = "C:\Bitnami\wampstack\apps\wikindx\htdocs" ;
    The localhost works here as I am just testing locally

    On my Ubuntu server system I now have
    public $WIKINDX_BASE_URL = "http://192.168.178.12/wikindx" ;
    public $WIKINDX_WIKINDX_PATH = "/var/www/html/wikindx" ;

    My server IP addresses are static so fixing the IP address is not an issue for me.

    and I have copied the
    "/var/www/html/wikindx/core/tiny_mce/plugins/wikindxCite/js"
    to
    "/var/www/html/wikindx/js"

    The citations do work. Yay! :-)
    I realise this is a bit of a fudge but it gets it going.

    I have found two other issues.
    1)
    I was getting an error saying "tinyMCE is not defined or missing }"

    For tinymce to work properly with Apache on Ubuntu you need to set the following
    in the /etc/apache2/apache2.conf file:

    EnableSendfile on

    by default this is not set or off.

    2)
    The layout and screens did not look like the ones in the demo test on line.
    On my windows test set up I had to manually create the folder.
    \styles\CACHE

    I did not need to create this on the Ubuntu server.

    Just wanted to say thank you to every one for the support
    Peter

     
  • Mark Grimshaw

    Mark Grimshaw - 2019-07-07

    Thanks Pete,

    I'll put info about EnableSendfile in the config.php.dist file.

    Regards,

    Mark

     

Log in to post a comment.