Details

    • Type: Feature Request Feature Request
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.1.10 EE GA1
    • Fix Version/s: None
    • Labels:
      None
    • Similar Issues:
      Show 4 results 

      Description

      While working with Journal Articles, I found quite annoying and time consuming inonvenience. Method validateContent JournalArticleLocalServiceImpl looks like this:

      	protected void validateContent(String content) throws PortalException {
      		if (Validator.isNull(content)) {
      			throw new ArticleContentException();
      		}
      
      		try {
      			SAXReaderUtil.read(content);
      		}
      		catch (DocumentException de) {
      			throw new ArticleContentException();
      		}
      	}
      

      Everything works fine till DocumentException is thrown - it is not included within newly created ArticleContentException (it cost me 20 more minutes to find the cause of the problem).

      I suggest replacing

      		catch (DocumentException de) {
      			throw new ArticleContentException();
      		}
      

      with

      		catch (DocumentException de) {
      			throw new ArticleContentException(de);
      		}
      

      Regards,
      KG

        Activity

        Hide
        Krzysztof Gołębiowski added a comment -

        Similar problem happens in class JournalContentImpl:

        protected JournalArticleDisplay getArticleDisplay(
        		long groupId, String articleId, String templateId, String viewMode,
        		String languageId, int page, String xmlRequest,
        		ThemeDisplay themeDisplay) {
        
        		...
        		
        		catch (Exception e) {
        			if (_log.isWarnEnabled()) {
        				_log.warn(
        					"Unable to get display for " + groupId + " " +
        						articleId + " " + languageId);
        			}
        
        			return null;
        		}
        	}
        

        Exception should be send as a parameter within "warn" method:

        _log.warn(
        					"Unable to get display for " + groupId + " " +
        						articleId + " " + languageId, e);
        
        Show
        Krzysztof Gołębiowski added a comment - Similar problem happens in class JournalContentImpl: protected JournalArticleDisplay getArticleDisplay( long groupId, String articleId, String templateId, String viewMode, String languageId, int page, String xmlRequest, ThemeDisplay themeDisplay) { ... catch (Exception e) { if (_log.isWarnEnabled()) { _log.warn( "Unable to get display for " + groupId + " " + articleId + " " + languageId); } return null ; } } Exception should be send as a parameter within "warn" method: _log.warn( "Unable to get display for " + groupId + " " + articleId + " " + languageId, e);
        Hide
        Krzysztof Gołębiowski added a comment -

        Affected version is 6.1.0 CE GA1. I cannot change existing task so I post this info as comment.

        Show
        Krzysztof Gołębiowski added a comment - Affected version is 6.1.0 CE GA1. I cannot change existing task so I post this info as comment.
        Hide
        Randy Zhu added a comment -

        In preparation for Ideation; we are merging New Feature and Improvement tickets into a singular ticket type called “Feature Request”. Additional information to follow soon.

        Show
        Randy Zhu added a comment - In preparation for Ideation; we are merging New Feature and Improvement tickets into a singular ticket type called “Feature Request”. Additional information to follow soon.
        Hide
        Krzysztof Gołębiowski added a comment -

        Seems that problem was fixed on master two days before I filed this issue, and it was more than a year ago This issue can be closead as it is no loger reproducible (Fixed by https://github.com/liferay/liferay-portal/commit/0bcfe9b1f94b41e218cfe58de4fe0fc75b9f9c7b).

        Show
        Krzysztof Gołębiowski added a comment - Seems that problem was fixed on master two days before I filed this issue, and it was more than a year ago This issue can be closead as it is no loger reproducible (Fixed by https://github.com/liferay/liferay-portal/commit/0bcfe9b1f94b41e218cfe58de4fe0fc75b9f9c7b ).

          People

          • Assignee:
            SE Support
            Reporter:
            Krzysztof Gołębiowski
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development

                Structure Helper Panel